2 // System.TypeLoadException.cs
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 {
24 public TypeLoadException ()
25 : base (Locale.GetText ("A type load exception has occurred."))
29 public TypeLoadException (string message)
34 public TypeLoadException (string message, Exception inner)
35 : base (message, inner)
39 protected TypeLoadException (SerializationInfo info, StreamingContext context)
40 : base (info, context)
43 throw new ArgumentNullException ("info is null.");
45 type = info.GetString ("TypeLoadClassName");
49 public override string Message {
55 msg = "Cannot load type '" + type + "'";
61 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", type, typeof (string));
78 info.AddValue ("TypeLoadAssemblyName", "", typeof (string));
79 info.AddValue ("TypeLoadMessageArg", "", typeof (string));
80 info.AddValue ("TypeLoadResourceID", 0, typeof (int));