why CustomAttribute `Parent` column ` HasCustomAttribute` is different with ECMA335 ? and what is last two 0?
See original GitHub issueecma 22.10 say CustomAttribute Parent
column HasCustomAttribute
:
• Parent (an index into any metadata table, except the CustomAttribute table itself; more precisely, a HasCustomAttribute (§24.2.6) coded index)
why in dnlib is only 24 table ? and last two is 0?
public static readonly CodedToken HasCustomAttribute = new CodedToken(5, new Table[24] {
Table.Method, Table.Field, Table.TypeRef, Table.TypeDef,
Table.Param, Table.InterfaceImpl, Table.MemberRef, Table.Module,
Table.DeclSecurity, Table.Property, Table.Event, Table.StandAloneSig,
Table.ModuleRef, Table.TypeSpec, Table.Assembly, Table.AssemblyRef,
Table.File, Table.ExportedType, Table.ManifestResource, Table.GenericParam,
Table.GenericParamConstraint, Table.MethodSpec, 0, 0,
});
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
ECMA-335, 5th edition, December 2010
This Ecma Standard has been adopted by the General Assembly of December 2010. "DISCLAIMER ... of which the final character has the value...
Read more >c# - Check if property has attribute
There's no fast way to retrieve attributes. But code ought to look like this (credit to Aaronaught): var t = typeof(YourClass); var pi...
Read more >Partition II : Metadata
All standardized assemblies shall have the last two 32-bit integers set to 0. This standard places no other requirement on the use of...
Read more >System.Reflection.Metadata.xml 1.3.0
Custom attribute value blob. </param> <remarks> Entries may be added in any order. The table is automatically sorted when serialized. </remarks>
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sorry , dnlib is same with ECMA335, I set wrong HasCustomAttribute relate tables .so table bits calculate wrong … thanks for help again.
yes, but in dnlib ,maxRows compare with total 0xffff , is that mean all 16bits coded rid and no bit for table index? i notice some .net pe use 2bytes for coded index column , and one of relate coded table row number > remaining byte(for rid) , in ECMA335 it should be 4bytes , but in dnlib is 2bytes , and these files seem like dnlib is right .