About attribute

T

Tony Johansson

Hello!!

I just make some test about the obsolete attribute. It works as documented
but I have one question.

If I use the ILDASM to look into the PE assembly I can't see any trace at
all of the obsolete attribute.
I have thought that I can see some trace of attribute when using the ILDASM
but this might be wrong.


//Tony
 
M

Marc Gravell

Well, for me it certainly shows in both ILDASM and reflector. At the
class level it shows (in ILDASM) as a red-right triangle; for a method
it appears inside the method, i.e. below (first is ILDASM, second is
reflector).

..custom instance void
[mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 02 48 69
00 00 ) // ...Hi..

.custom instance void
[mscorlib]System.ObsoleteAttribute::.ctor(string) = { string('Hi') }

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top