Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
There are several ways to check a string to see if it’s empty. However, you should try to always use the following method. It’s faster, and uses less resources. This may seem like a minimal piece of code - but if you were checking strings through out your application, it all adds up in the end.
string strAmIEmpty = "";
if (strAmIEmpty.Length == 0)
{
// empty so do something
}