Undefined String Array..
-
Hi can anyone write a one line if() condition to find out whether a string array has undefined values?? I am checking like this:
if(arr == nullptr)
but this does not help..Som
-
This checks if array itself is null. I think the OP want to know if array contains at least one item that is null.
[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe -
Hi can anyone write a one line if() condition to find out whether a string array has undefined values?? I am checking like this:
if(arr == nullptr)
but this does not help..Som
What about
if(Array.IndexOf(arr,null)>-1)
?
[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe -
Hi can anyone write a one line if() condition to find out whether a string array has undefined values?? I am checking like this:
if(arr == nullptr)
but this does not help..Som
-
What about
if(Array.IndexOf(arr,null)>-1)
?
[My Blog]
"Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn
"Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe -
Hi can anyone write a one line if() condition to find out whether a string array has undefined values?? I am checking like this:
if(arr == nullptr)
but this does not help..Som
assign null on the definition of your array and then you can check if(arr==null) otherwise compilor will gave error