C# Exception Finalize
In this chapter you will learn:
- Get to know Exception.Finalize
- Syntax for Exception.Finalize
- Returns for Exception.Finalize
- Example - Exception.Finalize
Description
Exception Finalize
allows an object to try to free resources
and perform other cleanup operations before it is reclaimed by garbage collection.
Syntax
Exception.Finalize
has the following syntax.
protected virtual void Finalize()
Returns
Exception.Finalize
method returns
Example
using System;// www. j a va2s . co m
public class MainClass{
public static void Main(String[] argv){
Exception e = new Exception("asdf")
System.Console.WriteLine(e.Finalize());
}
}
Next chapter...
What you will learn in the next chapter:
- Get to know Exception.GetBaseException
- Syntax for Exception.GetBaseException
- Returns for Exception.GetBaseException
- Example - Exception.GetBaseException
C# Exception Data
C# Exception HelpLink
C# Exception InnerException
C# Exception Message
C# Exception Source
C# Exception StackTrace
C# Exception TargetSite
C# Exception Exception()
C# Exception Exception(String)
C# Exception Exception(String, Exception)
C# Exception Equals(Object)
C# Exception GetHashCode
C# Exception GetType
C# Exception MemberwiseClone
C# Exception ToString
C# Exception HelpLink
C# Exception InnerException
C# Exception Message
C# Exception Source
C# Exception StackTrace
C# Exception TargetSite
C# Exception Exception()
C# Exception Exception(String)
C# Exception Exception(String, Exception)
C# Exception Equals(Object)
C# Exception Finalize
C# Exception GetBaseExceptionC# Exception GetHashCode
C# Exception GetType
C# Exception MemberwiseClone
C# Exception ToString