C# Programming Questions and Answers
The method called by clients of a class to explicitly release any resources like network,connection,open files etc.When the object is no longer required?
Dispose() is only method called by clients of a class to explicitly release any resource like network connection,open files etc.when object is no longer required.Hence,Dispose() provides programmer with such programming control.
Which of the following statements are correct?
Answer: Option (B) and Option (C)
Select correct statement about destructor in C#?
Answer: Option (A) and Option (B)
What is the return type of destructor ?
Destructors do not have any return type not even void
Name a method which has the same name as that of class and which is used to destroy objects also called automatically when application is finally on process of being getting terminated.
Definition of destructor.
Operator used to free the memory when memory is allocated ?
‘New’ is used to allocate memory in the constructors.Hence,we should use ‘delete’ to free that memory.
Which among the following is NOT considered as .NET Exception class?
Answer: Option (B) and Option (C)
Select the statements which describe the correct usage of exception handling over conventional error handling approaches?
Answer: Option (D)
Which among the following is NOT an exception?
Answer: Option (C)
Which of the following is the correct statement about exception handling in C#.NET?
Answer: Option (A) and Option (C)