help
Root Question Message
MethodImpl
, DllImport
, Flags
, AttributeUsage
MethodImpl
or DllImport
for exampleAttributeUsage
yes, Flags
maybe[Obsolete]
is more often used if you develop a library and decide to make a breaking change that would effect end users. It is a way to inform them of this and in pretty much all cases it contains information on what must be done in order to migrateMethodImpl
is something that could improve the performance of your code but it is not guaranteed. It's better to just let the compiler handle any extra performance improvementsDllImport
might work for you in order to call native c++ code if you want.Flags
and AttributeUsage
are way too specific, and in general it really just depends on what you work on, and won't make your code "better"Flags
or AttributeUsage
? Flags
is only used with an enum if you use it as a bitfield, which can be often or never at all. AttributeUsage
is completely optional and might be used to restrict your attribute usage, which might not be required at all.