I was going to use this an opportunity to vent about the msdn documentation
and then discovered that the page on this particular method is better than
what I usually get on msdn docs.

http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getexecutingassembly.aspx

Assembly.GetExecutingAssembly Method

Gets the assembly that contains the code that is currently executing.


<rant>

so does anyone else get frustrated with this kind of documentation? It's
like finding comments in your code that say "Gets the value from the
property". yeah, I can see that from the code. Tell me something about why,
or how to use it? 95% of the msdn doc pages have no examples. Typically,
this particular one DOES but I'm sure thats because I wanted to rant about
it and murphy's law was invoked. Most don't. Some explanations on what
things actually do or why. Some examples. Please. We're guessing here and
don't always have time or skills to crack open the dll with decompiler of
the month and figure it out for ourselves.

More examples please. Free standing, spelt out, working examples. Pretend we
want to know how to use the methods. Give us an instruction manual. Please!!

You'd make some happy people if you showed us how to use the framework.
Throw some unit tests in there or something.

</rant>

thanks,

Stephen






On Wed, Mar 23, 2011 at 1:06 PM, David Kean <david.k...@microsoft.com>wrote:

> Hmm, I'll check internally, but I'd be surprised if we give that guarantee.
> We're free to change our inlining policy at any time, in fact, we did just
> that in 3.5 SP1 x64 which broke a lot of customers who were relying on
> Assembly.GetExecutingAssembly() without explicitly turning off inlining for
> the method.
>
> Whether you can repro something now, is not a good indication of whether
> we'll continue to support in a future service pack or version - always check
>  the docs. However, in saying that, the docs don't really make it clear that
> this might not work correctly in certain situations. In which case, if we
> don't give the above guarantee I'll make sure they call it out.
>
> -----Original Message-----
> From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
> On Behalf Of Mark Hurd
> Sent: Tuesday, March 22, 2011 9:36 PM
> To: ozDotNet
> Subject: Re: Raising property changed events
>
> On 23 March 2011 15:00, Mark Hurd <markeh...@gmail.com> wrote:
> > I believe it was in this mailing list that we previously confirmed
> > using GetCurrentMethod, even when included in convoluted ways,
> > guarantees the method will not be inlined.
>
> Gmail says GetCurrentMethod has /not/ been mentioned before on this mailing
> list since I've been part of it, so I'm remembering that wrong.
>
> > Can you show an example where GetCurrentMethod does not return the
> > expected method?
>
> This request still stands however.
> --
> Regards,
> Mark Hurd, B.Sc.(Ma.)(Hons.)
>
>

Reply via email to