Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
Questionerror i declaring null arrays Pin
tashee22-Dec-12 5:22
tashee22-Dec-12 5:22 
Hello,

I have declared a null array but when i try to use this array to store my values, it gives me an error as "use of unassigned local variable".
I donno whats wrong.
here is my code

double[] strPLatitude;
if (dr.HasRows)
{
while (dr.Read())
{
strPLatitude[i] = Convert.ToDouble(dr["latitude"].ToString());
i++;
}
}
AnswerRe: error i declaring null arrays Pin
Richard MacCutchan22-Dec-12 6:40
mveRichard MacCutchan22-Dec-12 6:40 
GeneralRe: error i declaring null arrays Pin
tashee22-Dec-12 7:39
tashee22-Dec-12 7:39 
GeneralRe: error i declaring null arrays Pin
PIEBALDconsult22-Dec-12 8:11
mvePIEBALDconsult22-Dec-12 8:11 
GeneralRe: error i declaring null arrays Pin
harold aptroot24-Dec-12 0:52
harold aptroot24-Dec-12 0:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.