On 21-Jan-2003, Ryan Trudelle-Schwarz <[EMAIL PROTECTED]> wrote: > -> -----Original Message----- > -> From: Discussion of the Rotor Shared Source CLI implementation > -> > -> The extern keyword is simply saying to the C# compiler that the > -> implementation of the method will be provided by somebody else. The most > -> common usage of the extern keyword is in the pinvoke declarations like: > > Care to explain that a bit more? Is there any way for someone reading the > code to figure out who "somebody else" is when there is no DllImport > attribute?
In general, no. > -> In this case and the case you have mentioned the CLR synthesizes the > -> method implementation based on the attributes. > > How does "[MethodImplAttribute(MethodImplOptions.InternalCall)]" tell the > CLR how to synthesize the method implementation? The CLR implementation will have predefined implementations of a fixed set of methods. When it sees an "InternalCall" MethodImplAttirubte, it will look up the name (and signature) of the method in its table of predefined (built-in) internal method implementations. -- Fergus Henderson <[EMAIL PROTECTED]> | "I have always known that the pursuit The University of Melbourne | of excellence is a lethal habit" WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.