Posts

Showing posts with the label C#

INDEXERS IN C#

                               We have see what are properties in C# ,now moving on to the indexers in C#. The work of indexers is same as properties lets revise what properties does , Properties are used to  initialize or to read that is read write operations on private data of class. As we have seen that the  data members of class are private by default in C# so they aren't allowed to be accessed outside the  class.Hence we used property for accesing the data members of class in properties we had get and  set accessor methods get to read and set to initialize , to overwrite, values of the data member of class. Now moving on to the indexers the work of indexers is the same as properties but they are used for  accessing the array type variables which are the part of class ,indexers also have the get and set  accessor in it the work of get and set accessor is same as ...

C# fundamentals

                                C# Fundamentals Well comming back to c# todays post is about to clear the concept about the basic of c# that is about the class and data members  OOPS concepts for c#:- All data members are allocated  in heap. The refrence of the object we create are stored in Stack. To declare the object and to instantiate are two different things   By just declaring the object dosent make the utilization of memory that is no class variables are          allocated in heap. Just by declaring the object we are creating the refrence .       i.e if we have class abc than, abc a; dosent make the members occupy memory in heap, But by abc a=new abc(); this gives instantiation to object what this statement actually means..?  This statement means that by writing new keyword we instantiate the object and...