blob: 250541c47d927e833f11f9e94119cb3cf8d873ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
using System;
using System.Reflection;
static class StaticClass
{
const int Foo = 1;
delegate object D ();
enum E {}
public static string Name ()
{
return "OK";
}
}
public class MainClass
{
public static int Main ()
{
Type type = typeof (StaticClass);
if (!type.IsAbstract || !type.IsSealed) {
Console.WriteLine ("Is not abstract sealed");
return 1;
}
if (type.GetConstructors ().Length > 0) {
Console.WriteLine ("Has constructor");
return 2;
}
Console.WriteLine (StaticClass.Name ());
return 0;
}
}
|