I just go down in C #. I created classes and objects, so I’ll say that I created a class called Member:
public class Member
{
public int MemberID;
public string FirstName;
public string LastName;
public string UserName;
}
and I create a new object of this class by doing this:
Member Billy = new Member();
Billy.UserName = "Jonesy";
Billy.FirstName = "Billy";
Billy.LastName = "Jones";
That everything is fine, but what if I requested a database and got 5 members, can I create objects on the fly? Or what is the best way to store these elements in memory?
I used VB.Net, wherever I just added them to the datatable. But I have never done object oriented programming before and thought, since I am learning C #, now is the best time to learn OOP.
source
share