* TextControl.cs: Make this operation undoable.
[mono-project.git] / mono / tests / isvaluetype.cs
blobe1c8a796f04c6b400aac1a66d3ad80b071453e55
1 using System;
3 namespace test {
5 public class Test {
6 public static int Main (string[] args) {
7 int verbose = 0;
8 if (args.Length > 0 && args[0] == "-v")
9 verbose++;
11 if (verbose != 0)
12 Console.WriteLine ("ValueType is valuetype: "+ typeof(System.ValueType).IsValueType.ToString());
13 if (typeof(System.ValueType).IsValueType)
14 return 1;
15 if (verbose != 0)
16 Console.WriteLine ("Enum is valuetype: "+ typeof(System.Enum).IsValueType.ToString());
17 if (typeof(System.Enum).IsValueType)
18 return 2;
19 if (verbose != 0)
20 Console.WriteLine ("TypeAttributes is valuetype: "+ typeof(System.Reflection.TypeAttributes).IsValueType.ToString());
21 if (!typeof(System.Reflection.TypeAttributes).IsValueType)
22 return 3;
23 if (verbose != 0)
24 Console.WriteLine ("TypeAttributes is enum: "+ typeof(System.Reflection.TypeAttributes).IsEnum.ToString());
25 if (!typeof(System.Reflection.TypeAttributes).IsEnum)
26 return 4;
27 if (verbose != 0)
28 Console.WriteLine ("Enum is enum: "+ typeof(System.Enum).IsEnum.ToString());
29 if (typeof(System.Enum).IsEnum)
30 return 5;
31 if (verbose != 0)
32 Console.WriteLine ("Int32 is valuetype: "+ typeof(System.Int32).IsValueType.ToString());
33 if (!typeof(System.Int32).IsValueType)
34 return 6;
35 return 0;