I am trying to learn the best ways to do some things in c#
When testing for an empty string, what is the best way to test it.
For example, if I have a textbox named txtValue
Should I use
txtValue.Text == ""
or
txtValue.Length == 0
and why would I use one over the other. And if it doesn't matter,
just let me know that also.
Thanks
When testing for an empty string, what is the best way to test it.
For example, if I have a textbox named txtValue
Should I use
txtValue.Text == ""
or
txtValue.Length == 0
and why would I use one over the other. And if it doesn't matter,
just let me know that also.
Thanks
Comment