views:

192

answers:

8

How to you find the URL that represents the documentation of a .NET framework method on the MSDN website?

For example, I want to embed the URL for the .NET framework method into some comments in some code. The normal "mangled" URL that one gets searching MSDN isn't very friendly looking: http://msdn.microsoft.com/library/xd12z8ts.aspx. Using a Google search URL isn't all that pretty looking either.

What I really want a URL that can be embedded in comments that is plain and easy to read. For example,

// blah blah blah. See http://<....>/System.Byte.ToString for more information

+5  A: 

A lot of the time you can merely append the lowercase namespace reference to the domain:

http://msdn.microsoft.com/en-us/library/system.windows.application_events.aspx

Moreover, for say the .Net 2.0 version (or any specific version) you can add "(VS.80)":

http://msdn.microsoft.com/en-us/library/system.windows.forms.button(VS.80).aspx

Other versions:

  • .Net 1.1 -> (VS.71)
  • .Net 2.0 -> (VS.80)
  • .Net 3.0 -> (VS.85)
  • .Net 3.5 -> (VS.90)

Try it for a method (Control.IsInputChar) like so: http://msdn.microsoft.com/en-us/library/system.windows.forms.control.isinputchar.aspx

sixlettervariables
Very nice. However, (how) does the schema work when generics are involved? My naive approaches aren't working. I fear there's no solution. :-/
Konrad Rudolph
@Konrad Rudolph: there isn't one that I know of, you have to use the mangled name. I'm a bigger fan of Shaun Austin's answer for the more general problem though.
sixlettervariables
+2  A: 

It's simple -- just add the name of the method to the end of http://msdn.microsoft.com//library/.

For example, to find the URL for the System.Byte.ToString method go to http://msdn.microsoft.com//library/System.Byte.ToString

Jeff Stong
+4  A: 

It's probably quickest to just type it into Google in my experience.

EDIT:

Now that you've edited your post to clarify what you actually meant I would say that embedding URLs in your comments is nice but you really have no guarantees that either the mangled URL or the pretty one will exist in future.

Shaun Austin
@Shaun Austin: don't forget "site:msdn.microsoft.com" to narrow your search
sixlettervariables
+1  A: 

I would just google it

Kevin Sheffield
A: 

Too bad I don't have enough rep to bump up Shaun's answer; Google is, indeed, the best way to search for a type on MSDN

Randolpho
A: 

Create a Search engine for MSDN Library in Firefox Like this perhaps?

Penguinix
+1  A: 

In my experiecne, googling it works faster than msdn search.

Mostlyharmless
+1  A: 

I find that googling "msdn " does it.

ie - msdn System.Web.UI.WebControls.Repeater.ItemDataBound

Slace