Class And Object
You can easily reach explanation of class and object in this page.
Classes are code blocks which include fields and methods in c#.
For Example;
In this field we ve created a class which name is "Computer" but if u want to use this class you should create an object from this class. Computer is not an object!!This is just a prototype for a new object.Let's create members of "Computer" class.
We ve created members of this class as " Brand & CPU & RAMcapacity &DisplayCard&MacAdress".Why did we use public or private in the beginning of our code?These are The Access Modifiers.The answer of this question is access modifiers gives an opportunity to access the subclass.When we create an object we use these and call these members from class.Also we should give a public access modifiers for class row, otherwise, class access modifiers will be "internal".
And the last step of this , creating an object..
Last updated
Was this helpful?