what are constructors and destructors
Answer / dsr
A constructor is a method, which is called when an object
of a class type is constructed, and it usually used for
initialization. A constructor method has following
characteristics:
It has the same name as class
It has no return type
It does not return any value
Constructors are always public and we use them to
initialize variable.
There is default class constructor without parameter,
provided by C# internally if we did not write any
constructor. when ever compile that class,compiler create
the default constructor(with out parameters).
In the other hand a Destructor is also called a finalizer.
It is just opposite the constructor, it is a method called
when the garbage collector reclaims an object.
Constructors have following characteristics:
The name of a destructor is same as name of class
The destructor declared with a tilde (~).
Destructors are always public and never other than public.
Destructors take no arguments. So, there is only one
destructor per class.
Destructors have no return type.
| Is This Answer Correct ? | 11 Yes | 3 No |
How can a win service developed in .NET be installed or used in Win98?
HI THIS IS THIRUMAL. I AM COMPLETED MY MCA IN 2009 WITH 64%. NOW I AM LOOKING FOR A JOB(FRESHER)IN HYDERABAD.PLEASE IF YOU FIND ANY OPENINGS IN ANY COMPANY SEND IT TO MY MAIL ID PLEASE.. SKILL SET : C,C++,C#.NET,ASP.NET,ADO.NET,SQL SERVER, SSIS,SSRS EMAIL ID : THIRU104@GMAIL.COM THANKS & REGARDS D.THIRUMAL
Explain cache memory? : Dot net architecture
Explain about appdomains?
Can I create my own permission set?
can aspx page contains two pager tags ?
What is the difference between abstract class and Interface? Give an example how will u write an abstract class using .NET Framework
what are constructors and destructors?
Whats new features in Visual Studio 2012?
What is password attribute of the textbox control of .net mobile? : Microsoft dot net mobile
In LINQ TO SQL if it is possible to select the top 5 records from the particular table using select top 5.
How will you do windows authentication and what is the namespace?