Why I keep getting this error whenever I declare new instance of data.ole classes ??
" Class1.cs(184): Use of unassigned local variable 'adoReader' "
:rolleyes:
Printable View
Why I keep getting this error whenever I declare new instance of data.ole classes ??
" Class1.cs(184): Use of unassigned local variable 'adoReader' "
:rolleyes:
here's what I did :
It looks right . Doesn't it ?Code:System.Data.OleDb.OleDbCommandBuilder builder;
C# enforces definite assignment, meaning, all variables must be assigned a value before accessing one of the objects members. For example:
Code:int i; // should be int i = 0;
// this will throw an error
Console.WriteLine(i.ToString());
That's right . But if I don't want to intialize a variable . still possible ?
Thanks
assign it null
Good idea :DQuote:
Originally posted by DevGrp
assign it null
Thanks guys !