VS 2005 not recognizing variable use
I just upgraded to VS.NET 2005 and it looks good except the compiler is warning me that I am declaring variables and not using them when I actually am. It is giving me "Unused local variable" on TimeMark, ExcelValues, points, X, Y in the following code:
VB Code:
Dim Progress As New ProgressForm("Writing to Excel")
Progress.MaxValue = FinalDataArray.GetUpperBound(0) + 1 - Trigger
Progress.StepValue = 1
Progress.Open() 'Open progress bar
Dim TimeMark As Double = 0
Dim ExcelValues(FinalDataArray.GetUpperBound(0)) As Double
Dim points As New ZedGraph.PointPairList
Dim X As Double
Dim Y As Double
For i = Trigger To FinalDataArray.GetUpperBound(0) + 1
Application.DoEvents()
X = TimeMark
Y = Conversion.Convert(FinalDataArray(i - 1), Conversion_Class.Type.Weight)
points.Add(X, Y)
TimeMark += Increment
Progress.Increment(1)
Next
Progress.CloseForm()
What's up with this?
Re: VS 2005 not recognizing variable use
I've had the same issue using Visual C# Express 2005. To fix it I built my application a few times and restarted and all was well.
Looks like you're not doing anything wrong...
Re: VS 2005 not recognizing variable use
Unfortunately, thus far VS 2005 appears to be rather buggy with items like what you have and also controls not changing when you tell them too. Hopefully it will all get fixed soon.