R ReidarT Feb 17, 2005 #1 How do I checkif a string is empty in C# like isNull(string) in VB? regards reidarT
J Joanna Carter \(TeamB\) Feb 17, 2005 #2 How do I checkif a string is empty in C# like isNull(string) in VB? regards Click to expand... if (string = null) Joanna
How do I checkif a string is empty in C# like isNull(string) in VB? regards Click to expand... if (string = null) Joanna
C Chris, Master of All Things Insignificant Feb 17, 2005 #3 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
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
G Guest Feb 17, 2005 #5 I used the code as follows as it worked. Note, c# is case-sensitive if (child == null) { strError = "Some Error"; return false; }
I used the code as follows as it worked. Note, c# is case-sensitive if (child == null) { strError = "Some Error"; return false; }
J Joanna Carter \(TeamB\) Feb 17, 2005 #6 if (string = null) //Doesn't this assign null to string? if (string == null) //This is what you want, to check if string is null Click to expand... Yup, still trying to juggle Delphi and C# ) Would you believe, I used to do C++ until about 10 years ago? Joanna
if (string = null) //Doesn't this assign null to string? if (string == null) //This is what you want, to check if string is null Click to expand... Yup, still trying to juggle Delphi and C# ) Would you believe, I used to do C++ until about 10 years ago? Joanna
E Eric Feb 18, 2005 #7 Yup, still trying to juggle Delphi and C# ) Would you believe, I used to do C++ until about 10 years ago? Click to expand... me too, we have similar backgrounds. I've got over a hundred legacy Delphi programs and I'm slowly migrating to C#. Eric
Yup, still trying to juggle Delphi and C# ) Would you believe, I used to do C++ until about 10 years ago? Click to expand... me too, we have similar backgrounds. I've got over a hundred legacy Delphi programs and I'm slowly migrating to C#. Eric