Before:
if (name == null || name == string.Empty)) { return "Please enter a name."; }After:
if (string.IsNullOrEmpty(name)) { return "Please enter a name."; }More Info: MSDN: String.IsNullOrEmpty
Subscribe to this rss feed to get your .NET tips from Mark Moeykens and his friends.
if (name == null || name == string.Empty)) { return "Please enter a name."; }After:
if (string.IsNullOrEmpty(name)) { return "Please enter a name."; }More Info: MSDN: String.IsNullOrEmpty