This is the code that works:

VB.NET Code:
  1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  2.  
  3.         Try
  4.             Dim myEmpDS As New EMPLOYEE_COLLECTION.EMPLOYEE_RECORDDataTable
  5.             Dim myempDsRow As EMPLOYEE_COLLECTION.EMPLOYEE_RECORDRow
  6. 'If I wish to loop, this is the place to do it.
  7.             myempDsRow = myEmpDS.NewRow()
  8.             myempDsRow.EMPLOYEE_NO = "ABHIJIT"
  9.             myempDsRow.FIRSTNAME = "ABHIJIT"
  10.             myempDsRow.LASTNAME = "ABHIJIT"
  11.             myempDsRow.NTID = "ABHIJIT"
  12.             myEmpDS.AddEMPLOYEE_RECORDRow(myempDsRow)
  13.             myEmpDS.WriteXml("hello.xml")
  14.         Catch ex As Exception
  15.             MsgBox(ex.InnerException)
  16.         End Try
  17.     End Sub