I did reverse engineering of a project using .NET Reflector everything is fine Instead of this error I don't know how I can solve it please guide me Thanks in Advance. Here is the code.
CS0212 You can only take the address of an unfixed expression inside of a fixed statement initializer
if (flag6 && !double.IsNaN(doubleValue))
{
double* numPtr1 = &this._MeasData[index].MeasValSum;//Error(You can only take address of an unfixed expression inside of a fixed statement initializer)
numPtr1[0] += doubleValue;
int* numPtr2 = &this._MeasData[index].MeasValNoOfValues; //Error(You can only take address of an unfixed expression inside of a fixed statement initializer)
numPtr2[0]++;
}
and the _MeasData Struct is
[StructLayout(LayoutKind.Sequential)]
private struct MeasChData
{
public MeasureInfo MeasInfo;
public int MeasChNumber;
public RollingPointPairList MeasureSamples;
public LineItem MeasuredValueLine;
public double MeasValSum;
public int MeasValNoOfValues;
public double MeasValLabel;
public double CurrentYMin;
public double CurrentYMax;
}
I tried casting but failed to sort out this error. I'm not good in English. So ignore if.... Thanks