Sunday 9 August 2015

What is Structure in C#.Net

   These are user defined type similar to classes . 
   What ever we can define under a class can also we define under a structure like variable, methods, construct etc.
It follows some features like 

  • It was a value type.
  • Doesn't support all the features like Inheritance.
  • Faster in Access.
  • Doesn't require a new operator for object creation which was only optional.
  • It can contain variable declare but cannot be initialized. Initializing the variables of a structure is possible only by using the constructor or through the object of structure.
  • A Default Constructor is mandatory.
  • supports only interface inheritance.



No comments:

Post a Comment