Of course you can have foreign TypeRefs, which are resolved by full name (namespace.name). TypeRefs are always resolved to TypeDefs by full name. Resolution scope only indicates in which TypeDef table this full name should be sought. For example, if TypeRef has a ModuleRef as the resolution scope, the TypeDef table of respective module must contain a record with the same full name. The only "domestic" TypeRefs are those with resolution scope 1 -- it means there must be a TypeDef table entry with the same full name in this very module. But the ref-to-def resolution is done by the Loader, and I don't see why you should concern yourself with anything but "domestic" TypeRefs.
Or did I misunderstand your question? Thanks, Serge -----Original Message----- From: Brent E. Rector [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 2:41 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Partition II Metadata Spec question One last question (for the day <g>), am I correct in understanding that if I have a TYPEREF resolution scope of anything except 0 or 1, the decoded token will correctly reference the appropriate type? That is, there's no heuristic like the foreign typeref where I must compare namespaces and names and, when they don't match, search appropriate table? -- Brent Rector, .NET Wise Owl Demeanor for .NET - an obfuscation utility http://www.wiseowl.com/Products/Products.aspx -----Original Message----- From: Serge Lidin [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 1:39 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Partition II Metadata Spec question Resolution scope of a nested TypeRef is another TypeRef (encloser). If a TypeRef has scope 0 (type defined somewhere in this assembly), 1 (in this module), ModuleRef (in another module of this assembly) or AssemblyRef (in another assembly), such TypeRef can't possibly refer to a nested type. Thanks, Serge You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.