Can anyone show me an example of MethodImplOptions.ForwardRef

Viewed 1767

It looks cool on MSDN:

Specifies that the method is declared, but its implementation is provided elsewhere.

So I tried it in a console application:

public class Program
{
    [MethodImplAttribute(MethodImplOptions.ForwardRef)]
    public static extern void Invoke();

    static void Main(string[] args)
    {
        Invoke();
        Console.Read();
    }
}

Then what should I do now? Where can I provide the implementation of Program.Invoke?

2 Answers
Related