views:

162

answers:

6

Here's an example of a wasted day:

(1) I want to find out exactly what Binding.FormattingEnabled does.

(2) I type MSDN Binding.FormattingEnabled into google and go to the page.

(3) I read the 3, 'helpful', line description.

(4) I check out the bottom of the page for references.

(5) Never mind, non of those helped....

(6) I search google and find nobody seems to know what the property does in its entirety.

(7) I open up reflector and spend hours in a tangled web before being 70% sure I know what's going on.

(8) I carry on coding, but the 30% is niggling at me.

(9) Repeat 6 - 8 ad nauseum ...

There must be a better way!

I'm using VS.Net 2008 Express edition, btw.

ETA: The FormattingEnabled property was just an example, this is more of a general question. Using reflector, I'm about 94.314% sure of how it works.............

+4  A: 

This answers the title of your question. If you have a specific question about something, ask that instead.

Here's the documentation for Binding.FormattingEnabled. To help you out, we need to know either:

  1. What you're trying to do, and how you've attempted it so far (preferable).
  2. The question you have about the FormattingEnabled property itself. This would get you an explanation of the property, but might not help you solve the problem you're working on.

PS: For API documentation of any large API, the MSDN documentation for .NET is the best you will ever find.

280Z28
+1 MSDN documentation is the best I've ever used. Apple, Google, ESRI: pull your socks up.
MarkJ
A: 

Setting this property to true also enables error-handling behavior and causes the BindingComplete event to be raised. The handler of this event can take the appropriate action, based on the success, error, or exceptions in the binding process, by examining the BindingCompleteState property of the BindingCompleteEventArgs parameter.

Seems a pretty good explanation to me. If you tell us what is exactly your doubt about this precise property or where you are stuck, preferably with some code sample, then maybe we can help you.

Konamiman
Hi, it was more of a general question, I just used FormattingEnabled as an example. But, to address this issue, the first line is: "Gets or sets a value indicating whether type conversion and formatting is applied to the control property data.". This is, simply, not true. Using reflector, I found that with the property set to false, type conversion does still occur, but with the omission of the format string and format provider.
Jules
+1  A: 

Well, mostly, but not in every single case. What you describe is exactly what I too would have done, and almost every developer out there as well (at least the ones that I know or have heard of...). It's definitely the best way to find information on a particular issue.

In some (rare) cases, you can have bad luck. This is what happened to you. But there's no better way...

Thomas Weller
+1  A: 

For stuff like this, I DO feel that the MSDN is really your best source for documentation. Some classes and / or its properties and methods are better explained than others, but I feel that (warning: opinion!) the MSDN documentation is far better than the Java Docs.

If you feel that you have too little information, just ask here on StackOverflow what a certain property does.

Razzie
+4  A: 

I feel your pain. A lot of API documentation is just semi-auto generated filler, e.g.

Property Name: Foo
Description: Gets and sets the value of Foo
Remarks: Use this to get or set the value of Foo
Example: Foo = bar

However, that's not always the case, and generally speaking, I find MSDN quite detailed and useful. I guess you have happened upon a bit where the development team "didn't have time" to fill it in properly.

Having said that, MSDN also contains lots of "How To" and "Overview" topics, which are far removed from the API bits, and not linked to them in any way (helpful!), but if you can find them, they are generally more useful. You need to dig around in the table of contents a lot, and get a feel for the thought processes of the people who organise the contents tree.

Christian Hayter
+7  A: 

Since I am a Microsoft writer, my opinion might be a little bit subjective, of course. But I don't think you are going to find a more detailed API description anywhere. If you are learning a new technology (e.g. LINQ) you may find better 3d party tutorials and books, because MSDN focuses more on reference materials. But for API, I really doubt.

Let me explain a little bit about how documentation teams at Microsoft work. We have tons of API. We try our best to document all of them, but sometimes we need to decide which ones are going to be used more than others and what level of documentation is necessary. And let me assure you that it is simply impossible to provide examples for every single property and method in the API. Also, since we have so much documentation it sometimes might be difficult to navigate in it. So I'd like to give you some tips on how to navigate within documentation and how to help us to improve it.

  1. Your first two steps are fine: search engines do index MSDN content pretty well and a lot of users prefer this to MSDN search. However, MSDN search not only shows you the links, but also the version of the Framework and allows you to filter the results. I noticed that people often find docs on .NET 1.1, because they are the oldest topics and get a lot references to it. So they come up first in the search engines. For your particular example, the first link from Google actually goes to .NET 3.5, which is probably what you want. But as I said, it's not always the case.

  2. So, when you open an API reference page, make sure that you are in the right version. In the lightweight version, you can switch versions under the topic title. In the classic version, use the gray box in the top right corner.

  3. OK, it is the right version. Now look for two essential sections: Remarks and Examples. Syntax, Platform Version, etc. are autogenerated, but those two are written by real people.

  4. In your case, there is only Remarks, and you think it is not enough. OK, now you have two options.

    a) Look at the class itself. An example of the class usage often shows how members of the class work together, so you can at least get more understanding of the context.

    b) Look at the See Also. Again, there is a trick. A lot of links in this section are autogenerated. This includes links to the containing class, members of this class, and also the containing namespace. The rest is added manually by the writer. The most useful are usually listed under "Other Resources". These are conceptuals and how-tos.

    In your case, I see only one: How to: Handle Errors and Exceptions that Occur with Databinding. And there I can find this:

    "This code example demonstrates how to handle errors and exceptions that occur during a data-binding operation. It demonstrates how to intercept errors by handling the Binding..::.BindingComplete event of the Binding objects. In order to intercept errors and exceptions by handling this event, you must enable formatting for the binding. You can enable formatting when the binding is constructed or added to the binding collection, or by setting the FormattingEnabled property to true."

    I guess this answers your original question.

  5. But let's suppose that you didn't find an answer. Let us know! Really, we do look for feedback and we provide the feedback option for each and every MSDN topic. In the lightweight version, use the orange "Feedback" button at the right-bottom corner. In the classic version, use the Feedback link in the top-right corner. We do read all the feedback. And if you tell us your email, we can write you back. If we receive enough feedback indicating that the topic needs more info, we often do add more info. Or at least we can write you back and tell you where to look for the info.

  6. And yes, there are more use cases in the world than we can document. People often invent new things or find amazing ways of using the old ones. Forums like this one on the stackoverflow or MSDN forums sometimes is the best solution, because they can help you to solve your particular problem, while documentation is always about more general solutions.

I really hope this answer will help you to find help online easier next time.

Alexandra Rusina