Hi,
I Working on Asp.net 2.0. I am declaring and initializing variables globally like this:-
And find the following error:- A field initializer cannot reference the nonstatic field, method, or property..Code:double a1=0.0081; double B3=12.61/100; double B4=B3-a1; double B5=B4-a1; double B6=B5-a1; double F8=Convert.ToDouble(TxtSqFeet.Text.ToString()); double F9=Convert.ToDouble(TxtLinealFeet.Text.ToString()); double G6=Convert.ToDouble(TxtTravelTime.Text.ToString()); double G11=Convert.ToDouble(TxtLiners.Text.ToString());
Second Error is TxtSqFeet expect a class.
Please help me to resolve this error.


Reply With Quote

