Tech Off Post

Single Post Permalink

View Thread: is 'new object().property' or 'new object().method()' a good idea?
  • User profile image

    I think the whole topic is splitting hairs in managed code. C or C++ I can see worrying. When you hard coding the string like you suggest I see no problem not testing for IsEmptyOrNull as you will always get the same result. In random input scenarios like reading in from file, form etc I would always test for invalid input before you commit it to anything non trivial.