Constructors

Unknown | 12:52 AM |

Constructors are special member functions, which are used for initializing the
class data members. In the earlier object oriented programming languages
constructors were quite important since initialization of the data members was
not allowed at the time of declaration. C# however allows us to have the member
variables to be initialized along with declarations. Then why are constructors
required? Well, the variables may not always be initialized to some constants but
can also be initialized with the values specified by the user. There can also be
certain kind of processing to be done while a class is instantiated. So a
constructor happens to be quite important member function in the class as far as
initialization is concerned.
C# supports following types of constructors

  1.  Default Constructors
  2.  Parameterized constructors
  3.  Private constructors
  4.  Static constructors

Category:

About http://dotnetvisual.blogspot.in/:
DOT NET TO ASP.NET is a web application framework marketed by Microsoft that programmers can use to build dynamic web sites, web applications and web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime, allowing programmers to write ASP.NET code using any Microsoft .NET language. create an application very easily ....