[Microsoft.CSharp] Replaced with CoreFX implementation
[mono.git] / mcs / tests / test-partial-11.cs
1 using System;
2 using System.Reflection;
3
4 static partial class StaticClass
5 {
6     public static string Name ()
7     {
8         return "OK";
9     }
10 }
11
12 partial class StaticClass2 {}
13 static partial class StaticClass2 {}
14
15         
16 public class MainClass
17 {
18         static bool IsStatic (Type t)
19         {
20                 Type type = typeof (StaticClass);
21                 if (!type.IsAbstract || !type.IsSealed) {
22                         Console.WriteLine ("Is not abstract sealed");
23                         return false;
24                 }
25         
26                 if (type.GetConstructors ().Length > 0) {
27                         Console.WriteLine ("Has constructor");
28                         return false;
29                 }
30                 return true;
31         }
32
33     public static int Main ()
34     {
35         if (!IsStatic (typeof (StaticClass)))
36             return 1;
37
38                 if (!IsStatic (typeof (StaticClass2)))
39                         return 2;
40         
41         Console.WriteLine ("OK");
42         return 0;
43     }
44 }