Re: fxcop
Earnie Boyd <[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Message-ID | <[email protected]> |
Gopal V wrote: >Hi, > > > >>Forgive my stupidity but ... How is a defined? >> >> > >'a' is a String .. which is where this discussion > > 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++? > >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. > > > 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. Earnie -- http://www.mingw.org http://sourceforge.net/projects/mingw https://sourceforge.net/donate/index.php?user_id=15438