Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why a string comes back as null
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Divers
Thread ID:
01365266
Message ID:
01365381
Vues:
9
>Curious as to why you don't use String.Empty for your empty string comparison? Also initialize fileName = String.Empty.

There differences between the two are really minor. To check if a string actually is empty I actually tend to actually use something like fileName.Length == 0.

Here's an interesting (short) comment about it:

http://blogs.msdn.com/brada/archive/2003/04/22/49997.aspx
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform