diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2010-09-20 21:44:20 +0400 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2010-09-20 21:44:56 +0400 |
commit | f16036819a664045e0a24dd4f98be8df47bcc4d2 (patch) | |
tree | bb7115219b07914be26c65339618789d2657a40e | |
parent | 784d21f5fd8277f301a7d9dc717c85bf6a59eb9d (diff) |
Use List<Exception> instead of ArrayList to make things prettier.
-rw-r--r-- | mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs index 21f57af74f2..4423058cdd1 100644 --- a/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/AssemblyBuilder.cs @@ -39,6 +39,7 @@ using System.Runtime.Serialization; using System.Globalization; using System.Runtime.CompilerServices; using System.Collections; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Security; using System.Security.Cryptography; @@ -826,16 +827,16 @@ namespace System.Reflection.Emit } if (res != null) { - ArrayList exceptions = null; + List<Exception> exceptions = null; foreach (var type in res) { if (type is TypeBuilder) { if (exceptions == null) - exceptions = new ArrayList (); + exceptions = new List <Exception> (); exceptions.Add (new TypeLoadException (string.Format ("Type '{0}' is not finished", FullName))); } } if (exceptions != null) - throw new ReflectionTypeLoadException (new Type [exceptions.Count], (Exception[])exceptions.ToArray (typeof (Exception))); + throw new ReflectionTypeLoadException (new Type [exceptions.Count], exceptions.ToArray ()); } return res == null ? Type.EmptyTypes : res; |