blob: f9d312bb8a567c8cc62d67f0f21c8cd9ade33793 (
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
|
// Compiler options: -warnaserror
using System;
using System.Reflection;
sealed class X
{
~X ()
{
Foo ();
}
public void Foo ()
{
}
public static int Main ()
{
foreach (var m in typeof (X).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly)) {
Console.WriteLine (m.Name);
Console.WriteLine (m.Attributes);
if (m.Attributes != (MethodAttributes.Virtual | MethodAttributes.Family | MethodAttributes.HideBySig))
return 1;
}
return 0;
}
}
|