using System;
using System.Reflection;
using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
namespace preservesig_test
{
class Class1
{
- static int Main(string[] args)
+ public static int Main(string[] args)
{
MethodInfo dofoo = typeof(TestClass).GetMethod("DoFoo");
if ((dofoo.GetMethodImplementationFlags() & MethodImplAttributes.PreserveSig) == 0)
public event D e;
[PreserveSig()]
- [MethodImpl(MethodImplOptions.InternalCall,MethodCodeType=MethodCodeType.Runtime)]
public int DoFoo()
{
return 0;