Object in C# | An Object in Oops | What is Object in C sharp
Object is an entity of class which contains/Encapsulate all the functionality/futures of Class.
object encapsulate behavioural of the class. By the 'New' keyword we are requesting to CLR (Common Language Runtime) for creation of
an object.
An Object in c# |
Many developer says that by the new keyword we are going to object (no).
See here:
Class ClsEmployee
{
}
Object in C# | An Object in Oops | What is Object in C sharp
Class Ref Var/Object Constructor
| | |
| | |
ClsEmployee Objemp=new ClsEmployee()
|
|
Request to
Create an Object (At this stage multiple operation has been done by CLR-common Language Runtime).
In Class article as i told you class is reference type and that's why it store inside the Heap mamory,so when we are requesting to CLR for
object creation/Instation it provides the memorey address for storing data in heap memory. In our above example common language runtime provide
memory address to 'Objemp' and by objemp data is store inside the those memory address.
An Object is basically a block of memory, which is alloacted according to class.
I recommended all oops Concept are given below, you are going to learn one by one:
- Class And Namespace in C#
- Object
- Constructor
- Variables
- Static Class
- Static Constructor
- Static Method
- Enacpuslation
- Abstraction
- Abstact Class
- Abstract Method
- Interface
- Private Constructor
- Sealed Class
- Inheritance
- Polymorphism
- Method Hiding
- Method Overloading
- Method Overriding
- Compile Time Polymorphism
- Run time Polymorphism
- Difference between constructor and Static Constructor
If you have nay query kindly let me know. thanks for the learning have a nice day.
No comments:
Post a Comment
If you have any query kindly let me know.