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 to call the dll at runtime in .Net?
The maximum report processing jobs limit configured by your system administrator has been reached.How I can Solve this problem when i using crystal report to load from my application.
Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure on hardware that converts the ascii value to binary? : .NET Architecture
Explain cache? : .NET Architecture
What is an asssembly qualified name? Is it a filename? How is it different?
Define cache? : Dot net architecture
What is biginteger and when would you use that?
how to add list of items in a web application and win application?
Explain cache memory? : Dot net architecture
Describe the advantages of writing a managed code application instead of unmanaged one. What is involved in certain piece of code being managed?
what is meant by language interoperability and language integration?
how to delete the record using data reader