C# Exception MemberwiseClone
In this chapter you will learn:
- Get to know Exception.MemberwiseClone
- Syntax for Exception.MemberwiseClone
- Returns for Exception.MemberwiseClone
- Example - Exception.MemberwiseClone
Description
Exception MemberwiseClone
creates a shallow copy of
the current Object.
Syntax
Exception.MemberwiseClone
has the following syntax.
protected Object MemberwiseClone()
Returns
Exception.MemberwiseClone
method returns A shallow copy of the current Object.
Example
using System;/*from w w w . j a va2 s . co m*/
public class MainClass{
public static void Main(String[] argv){
Exception e = new Exception("asdf")
Exception e1 = e.MemberwiseClone()
System.Console.WriteLine(e.Equals(e1));
}
}
Next chapter...
What you will learn in the next chapter:
- Get to know Exception.ToString
- Syntax for Exception.ToString
- Returns for Exception.ToString
- Example - Exception.ToString
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 Finalize
C# Exception GetBaseException
C# Exception GetHashCode
C# Exception GetType
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 GetBaseException
C# Exception GetHashCode
C# Exception GetType