AmbitionBox
Discover Best Places to work in India
Discover best places to work
Compare & find best workplace
Bring your workplace to life
Highlight your company's perks
Read reviews for 6L+ companies
Rate your former or current company
Discover salaries for 8L+ companies
Calculate your take home salary
Check your market value
Help other jobseekers
Read interviews for 90K+ companies
Interviews questions for 1K+ colleges
Contribute your interview questions
C# Programming
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?
Finalize()
End()
Dispose()
Close()
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?
There is one garbage collector per program running in memory
There is one common garbage collector for all programs
To garbage collect an object set all references to it as null
We have to specify run the garbage collector after executing VISUAL STUDIO.NET
Answer: Option (B) and Option (C)
Select correct statement about destructor in C#?
A class can have one destructor only
Destructors cannot be inherited or overloaded
Destructors can have modifiers or parameters
All of above mentioned
Answer: Option (A) and Option (B)
What is the return type of destructor ?
int
void
float
None of the mentioned
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.
Constructor
Destructor
End
Definition of destructor.
Operator used to free the memory when memory is allocated ?
new
free
delete
‘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?
Exception
StackUnderflow Exception
File Found Exception
Divide By zero Exception
Select the statements which describe the correct usage of exception handling over conventional error handling approaches?
As errors can be ignored but exceptions cannot be ignored
Exception handling allows separation of program’s logic from error handling logic making software more reliable and maintainable
try – catch – finally structure allows guaranteed cleanup in event of errors under all circumstances
All of the above mentioned
Answer: Option (D)
Which among the following is NOT an exception?
Stack Overflow
Arithmetic Overflow or underflow
Incorrect Arithmetic Expression
Answer: Option (C)
Which of the following is the correct statement about exception handling in C#.NET?
finally clause is used to perform cleanup operations of closing network and database connections
a program can contain multiple finally clauses
The statement in final clause will get executed no matter whether an exception occurs or not
Answer: Option (A) and Option (C)
Join India’s largest community to research company culture
Are you a student or working professional?
Student/Never worked
I am a student/I have never worked
Working Professional
I am working/I have worked before
What are your preferred job locations?
Popular Cities
Other Cities
Follow your preferred designations/job profiles
Suggestions based on your job profile
vs
Similar Companies