General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
>>>Do you really think that the type of pattern used by, for example, Int.TryParse() does not have uses ?
>>
>>No, it has its place, I guess, but it could just as easily have returned an object with 2 properties. Not looking to restart a lengthy discussion on style. It is just my personal opinion and practice.
>
>I agree with you up to here, but why does TryParse need to return success of failure? I rather have it returning null if it fails and then no need of an output parameter (or an object with 2 properties), I just need to remember that my variable should be nullable.
Starts to get messy if you don't *want* a nullable int ?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only