This is just sample code, but I wanted to know what would be the equivalent .net cobol to the while(dr.read) and populate to a list.
public class Student { public int ID { get; set; } public string Name { get; set; } public DateTime DateOfBirth { get; set; } } after that List<Student> student = new List<Student>(); SqlConnection conn = new SqlConnection(@"Data Source=.\\SQLEXPRESS;AttachDbFilename=D:\\Prac\\TestAssembly\\ForumsProjectCSharp\\App_Data\\Studetnt.mdf;Integrated Security=True;User Instance=True"); SqlCommand cmd = new SqlCommand("select * from Student", conn); SqlDataReader dr; try { conn.Open(); dr = cmd.ExecuteReader(); while (dr.Read()) { student.Add(new Student() { ID = dr.GetInt32(dr.GetOrdinal("ID")), Name = dr.GetString(dr.GetOrdinal("Name")), DateOfBirth = dr.GetDateTime(dr.GetOrdinal("DateOfBirth")) }); } dr.Close(); } catch (Exception exp) { throw; }



