Read Null values from text file

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello !

In c# , I am reading values from text files , when I try to get the value
from the text file and nothing is written there (Null - I think) , I get
Error message
{"Index was outside the bounds of the array." }.

How can I check if no value is written before I try to access the value?

Thanks !
 
when I try to get the value
from the text file and nothing is written there (Null - I think) , I get
Error message
{"Index was outside the bounds of the array." }.

What array? You didn't mention anything about any array.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 
Kevin ,
Thank U for your response!
I have already solve it with this line:

this.yourtextbox.Text.Length != 0
 
Back
Top