Unfortunately, you can't rely on the type's method tokens to be in contiguous sequence. This is characteristic of optimized metadata only ("#~" metadata stream).
How do you associate the method to its type when the tokens are not contiguous? The MethodDef table does not contain a TypeDef token. Am I missing something here?
But, of course, you are right: I wouldn't be able to use DefineMethod of the unmanaged metadata API if the method tokens always had to be in order. But how could that information be stored in the metadata tables when unoptimized?
Fabian
=================================== This list is hosted by DevelopMentorŪ http://www.develop.com Some .NET courses you may be interested in:
NEW! Guerrilla ASP.NET, 17 May 2004, in Los Angeles http://www.develop.com/courses/gaspdotnetls
View archives and manage your subscription(s) at http://discuss.develop.com