Click here to Skip to main content
11,630,144 members (79,267 online)
   

C#

 
Questionerror i declaring null arrays Pin
tashee22-Dec-12 5:22
membertashee22-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
mvpRichard MacCutchan22-Dec-12 6:40 
GeneralRe: error i declaring null arrays Pin
tashee22-Dec-12 7:39
membertashee22-Dec-12 7:39 
GeneralRe: error i declaring null arrays Pin
PIEBALDconsult22-Dec-12 8:11
memberPIEBALDconsult22-Dec-12 8:11 
GeneralRe: error i declaring null arrays Pin
harold aptroot24-Dec-12 0:52
memberharold aptroot24-Dec-12 0:52 

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

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


Advertise | Privacy | Mobile
Web04 | 2.8.150723.1 | Last Updated 28 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid