|
From: | Earnie Boyd |
Subject: | Re: [DotGNU] fxcop |
Date: | Sun, 02 May 2004 05:14:59 -0400 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |
Gopal V wrote:
A String and not a pointer to String object? So, a.Length should always have a valid location in memory? Or is this how C# is different than C++?Hi,Forgive my stupidity but ... How is a defined?'a' is a String .. which is where this discussion
Yes I'm familiar with the short circuit but is it really needed in this case? Being that a is not a pointer to a String object.Since short circuited logical expressions came with C , everybody assumes that a != null && a.Length == 0 will not throw a null ref exception, but that may not always be the case in *all* languages. But in C# it is.
Earnie -- http://www.mingw.org http://sourceforge.net/projects/mingw https://sourceforge.net/donate/index.php?user_id=15438
[Prev in Thread] | Current Thread | [Next in Thread] |