Senior .Net Developer Question:
Download Questions PDF

Explain me what is the difference between a class and an object, and how do these terms relate to each other?

Answer:

A class is a comprehensive data type that is the primary building block, or template, of OOP. Class defines attributes and methods of objects, and contains an object’s behavior and data. An object, however, represents an instance of class. As a basic unit of a system, objects have identity and behavior as well as attributes.

Make sure candidates respond to the second part of this .NET interview question, addressing how these terms are related to each other. Answer: The relationship is based on the fact that a class defines the states and properties that are common to a range of objects.

Download Senior .Net Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Tell us what do the following acronyms in .NET stand for: IL, CIL, MSIL, CLI and JIT?As you know read-only variables and constants have many similarities, but what is at least one way that they differ?