Groups | Blog | Home
all groups > c# > february 2005 >

c# : isnull in C#


PP
2/17/2005 3:09:02 PM
I used the code as follows as it worked.
Note, c# is case-sensitive :-)
if (child == null)
{
strError = "Some Error";
return false;
}




[quoted text, click to view]
Chris, Master of All Things Insignificant
2/17/2005 4:28:27 PM
if (string = null) //Doesn't this assign null to string?
if (string == null) //This is what you want, to check if string is null

Chris



[quoted text, click to view]

Joanna Carter (TeamB)
2/17/2005 10:13:14 PM
"ReidarT" <reidar@eivon.no> a écrit dans le message de news:
OqldjwTFFHA.3336@TK2MSFTNGP10.phx.gbl...

[quoted text, click to view]

if (string = null)

Joanna

--
Joanna Carter
Consultant Software Engineer

Eric
2/17/2005 10:26:07 PM
[quoted text, click to view]

me too, we have similar backgrounds. I've got over a hundred legacy
Delphi programs and I'm slowly migrating to C#.

ReidarT
2/17/2005 11:00:42 PM
How do I checkif a string is empty in C# like isNull(string) in VB?
regards
reidarT

ReidarT
2/17/2005 11:36:56 PM
I get the message, null is not exist in the class or namespace

reidarT
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> skrev
i melding news:%23yAlBAUFFHA.1348@TK2MSFTNGP14.phx.gbl...
[quoted text, click to view]

Joanna Carter (TeamB)
2/17/2005 11:40:30 PM
"Chris, Master of All Things Insignificant" <chris@No_Spam_Please.com> a
écrit dans le message de news: #yAlBAUFFHA.1348@TK2MSFTNGP14.phx.gbl...

[quoted text, click to view]

Yup, still trying to juggle Delphi and C# :-)) Would you believe, I used to
do C++ until about 10 years ago?

Joanna

--
Joanna Carter
Consultant Software Engineer

AddThis Social Bookmark Button