2 // System.TypeLoadException
5 // Sean MacIsaac (macisaac@ximian.com)
6 // Duncan Mak (duncan@ximian.com)
8 // (C) 2001 Ximian, Inc. http://www.ximian.com
11 using System.Globalization;
12 using System.Runtime.Serialization;
17 public class TypeLoadException : SystemException {
23 private string ClassName;
24 private string AssemblyName;
25 private string MessageArg;
26 private string ResourceID;
29 public TypeLoadException ()
30 : base (Locale.GetText ("A type load exception has occurred."))
32 msg = Locale.GetText ("A type load exception has occured.");
35 public TypeLoadException (string message)
41 public TypeLoadException (string message, Exception inner)
42 : base (message, inner)
47 protected TypeLoadException (SerializationInfo info, StreamingContext context)
48 : base (info, context)
51 throw new ArgumentNullException ("info is null.");
53 ClassName = info.GetString ("TypeLoadClassName");
54 AssemblyName = info.GetString ("TypeLoadAssemblyName");
55 MessageArg = info.GetString ("MessageArg");
56 ResourceID = info.GetString ("ResourceID");
60 public override string Message
65 public string TypeName
71 public override void GetObjectData (SerializationInfo info, StreamingContext context)
74 throw new ArgumentNullException ("info is null.");
76 base.GetObjectData (info, context);
77 info.AddValue ("TypeLoadClassName", ClassName, typeof (string));
78 info.AddValue ("TypeLoadAssemblyName", AssemblyName, typeof (string));
79 info.AddValue ("TypeLoadMessageArg", MessageArg, typeof (string));
80 info.AddValue ("TypeLoadResourceID", ResourceID);