added missing [Serializable] attribute
[mono.git] / mcs / class / corlib / System / TypeInitializationException.cs
1 //
2 // System.TypeInitializationException.cs
3 //
4 // Author:
5 //   Joe Shaw (joe@ximian.com)
6 //   Duncan Mak (duncan@ximian.com)
7 //
8 // (C) 2001 Ximian, Inc.  http://www.ximian.com
9 //
10 using System.Globalization;
11 using System.Runtime.Serialization;
12 namespace System {
13
14         [Serializable]
15         public class TypeInitializationException : SystemException {
16                 string type_name;
17
18                 // Constructors
19                 public TypeInitializationException (string type_name, Exception inner)
20                         : base (Locale.GetText ("An exception was thrown by the type initializer for ") + type_name, inner)
21                 {
22                         this.type_name = type_name;
23                 }
24
25                 // Properties
26                 public string TypeName {
27                         get {
28                                 return type_name;
29                         }
30                 }
31
32                 // Methods
33                 public override void GetObjectData (SerializationInfo info, StreamingContext context)
34                 {
35                         base.GetObjectData (info, context);
36                         info.AddValue ("TypeName", type_name);
37                 }
38         }
39
40 }