Tech Off Post

Single Post Permalink

View Thread: Error Handling, use exceptions?
  • User profile image
    jj5

    spod wrote:
    You are right that the base class librarys throw in common cases. Some of these behaviors are wrong imo in .net 1.0 /1.1 ( Int32.Parse( "cat" ) shouldn't throw for example ). Most of these are addressed in Whidbey with the addition of TryParse() etc.


    Where can I find the doco for the Whidbey APIs? Or, what is the TryParse() signature?

    I'd rather have an IsParseable(String) or IsValid(String) method, and have Parse(String) throw.

    I don't like methods that return status codes, and prefer to avoid default values (which I'm guessing TryParse will accept?) when possible.

    John.