ClassQuiz.md - brainchildservices/curriculum GitHub Wiki
What is a class?
A class is a user-defined blueprint or prototype from which objects are created.
What is an object?
Object is an entity that has state and behavior. Here, state means data and behavior means functionality. Object is a runtime entity, it is created
at runtime.
Define syntax of class declaration.
Accessibility Modifiers class NameofClass
{
body of class containing data members and member functions
}
Define instantiation.
When you create a new object in C# for a class using the new keyword, then it is called instantiation.
Define syntax of object creation.
ClassName objectName = new ClassName();
What do you have to do if you are asked to create an instance of a class or object of a class or instantiate the class?
We need to create an object of the class using the new keyword if we are asked to create instance of a class or object of a class or instantiate
the classClassname objectName=new ClassName();
Does we can create when the class is static?
No,An object cannot be created when the class is static. Members of the static classes are accessed using the classname.