Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why a string comes back as null
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Application:
Desktop
Miscellaneous
Thread ID:
01365266
Message ID:
01365381
Views:
8
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform