[runtime] Accomplish BITCODE build symbol sharing with only make (#3329)
[mono-project.git] / mono / tests / create-instance.cs
blob91658ad558807964849b6abc611d1782b9438fe0
1 using System;
2 using System.Reflection;
4 class T {
6 static int Main() {
7 Assembly a = AppDomain.CurrentDomain.Load ("mscorlib");
8 object o = a.CreateInstance ("System.Exception");
9 if (o == null)
10 return 1;
11 if (!(o is System.Exception))
12 return 2;
13 object[] args = new object [2];
14 args [0] = 'X';
15 args [1] = 10;
16 o = Activator.CreateInstance (typeof (System.String), args);
17 if (o == null)
18 return 3;
19 if (!(o is System.String))
20 return 4;
21 if (!"XXXXXXXXXX".Equals (o)) {
22 Console.WriteLine ("got: {0}", o);
23 return 5;
25 return 0;