2 ms·
in c# you wouldn't use the .Equals() method. You just do myString == someOtherString. Also it has a nice static method on the string class: if( string.IsNullOr
by danek 17y ago
in c# you wouldn't use the .Equals() method. You just do myString == someOtherString. Also it has a nice static method on the string class:
if( string.IsNullOrEmpty(mystring) ){}
I use that like crazy. I'm not sure if Java has something similar now. Years ago when I used java, I remember being constantly frustrated with having to write a helper method in every project to do { return myString==null || myString.equals("");}
I did find "something".equals(myString) helpful though.