I had this thing that keeps me in some parts of the code, and I have no idea what causes it.
I have a code block where I set a breakpoint. If I then use my cursor and hover over a variable, I can usually navigate through the contents and values of that variable.
While some variables I cannot view the contents, nothing appears.
In addition, if I try to investigate those that I cannot perform through the nearest window, he informs me The name 'temp' does not exist in the current context
It really annoys me only WHY this will happen, some integers, but not others, some objects of the class, but not others of the same type.
Closing Visual Studio and restarting it does not fix it.
I work in Debug without optimization.
Just look for some help on this issue, so be sure to get ahead of time.
Here is an example of the code where it occurs, there is no special code or delegates. This can happen in random parts of the program, even if there are several lines of code.
segs2D = ConvertSegmentsTo3DLines(segs2D);
IList<DSegment2D> segs3D = DSegment2D.Duplicate(segs2D);
TransformSegments(segs3D, transform);
foreach (var seg in segs3D)
MoveSegmentToSolid(seg, moveNormal, solid, false);
Dictionary<double, Strategy> strategiesDic = new Dictionary<double, Strategy>();
double d1 = (double)(segs3D[0].GetP1Tag() ?? 0);
double d2= (double)(segs3D[0].GetP2Tag() ?? 0);
foreach (DSegment2D seg in segs3D)
{
d1= (double)(seg.GetP1Tag() ?? d1);
d2= (double)(seg.GetP2Tag() ?? d2);
...Stuff
}