what is the difference between finally and dispose methods?

Answer Posted / sunil

finally will execute after the try block. It must execute
if there is any exception caught in the catch blobk or not.

Dispose method is the last method executed in the c# program

Is This Answer Correct ?    12 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the namespace level elements?

581


How can I create image pieces/sub image?

571


How do you serialize in c#?

549


Why do we use polymorphism in c#?

552


How does return work in c#?

604






Is datetime value type c#?

555


why delegate is type safe?

2679


What are strongly typed objects?

578


Is c# slower than java?

559


Why is c# a good programming language?

550


What is the diff between System.String and System.Text.StringBuilder classes?

615


Explain the accessibility modifier protected internal?

540


Can abstract class have constructor?

576


Define c# i/o classes? List the commonly used classes?

634


What is pure abstract class in c#?

553