Adam Kinney on .NET

Hunting Godzilla in .NET...

What's the default?

To me it seems rather difficult to find the defaults of a method or constructor when reading through MSDN Documentation.

Take the HttpResponse.Redirect Method for example,  it has two overloads and in the second one you can pass a boolean.  What's the default of the boolean when you don't pass it using the first overload?

Now through testing or reading you could figure it out, but to me it seems like defaults should be shown on the page in an obvious manner.

Am I the only one who has noticed this?

Posted: Feb 09 2004, 09:04 PM by AdamKinney | with 7 comment(s)
Filed under:

Comments

Jeff Julian said:

Reflector says it is true.
Inside the method, it calls Response.End if it is true at the end of the method.
# February 9, 2004 4:07 PM

Adam Kinney said:

Yep.

You illustrated my point perfectly. You had to fire up a third-party application to figure it out. I just want to read the defaults right in the documentation where I am already looking for information on the method.
# February 9, 2004 4:30 PM

Jeff Julian said:

I agree, but at the same time, I like to have multiple resources and if it isn't in the doc, it doesn't make me mad to pop open reflector.
# February 9, 2004 4:41 PM

Shannon J Hager said:

if it is not in the docs, then you don't exactly have mulitple resources, though, do you?
# February 9, 2004 6:15 PM

Scott Mitchell said:

I agree with Adam 100% - you shouldn't have to run a 3rd party app to determine the functionality of a public method.

That being said, such docs highlight the importance of being familiar with Reflector.
# February 9, 2004 11:34 PM

AndrewSeven said:

I'm not sure this is the best method to illustrate the problem.

The default in this case is the "old" behavior, which ends the response.

The doc for the methods doesn't state it clearly, but does sort of kind of vaguely imply with the method names and the mention of "End" that maybe the parameter will allow you to not end the response.

That people feel the need to use a decompiler as a way to augment documentation is a clear sign of failure of the doc.
# February 10, 2004 8:55 AM

Adam Kinney said:

Yeah it doesn't help to much, but its the first one I thought of :p

Glad to see I'm not the only thinking the MSDN docs are incomplete.
# February 10, 2004 10:12 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)