Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does it mean in Visual Studio debugger value "{ }"?

I have in my Visual Studio 2008 .NET C# project one property observed and debugger shows open and immediately closed curly brackets "{}". I believe it is uninitialized (I)List, but why it does not shows "null" or "unitialized". What does "{}" it means ?

br, Milan.

like image 784
milan Avatar asked Jun 18 '10 16:06

milan


People also ask

How can I see value while debugging in Visual Studio?

Hover over a variable to see its value. When stopped in the debugger hover the mouse cursor over the variable you want to look at. The DataTip will appear showing you the value of that variable. If the variable is an object, you can expand the object by clicking on the arrow to see the elements of that object.

What does a debugger do in Visual Studio?

The Visual Studio debugger helps you observe the run-time behavior of your program and find problems.

How do I see return value in Visual Studio?

View return values for functions If the window is closed, use Debug > Windows > Autos to open the Autos window. In addition, you can enter functions in the Immediate window to view return values. (Open it using Debug > Windows > Immediate.)


1 Answers

The most likely reason is that the type of the value in question overrides the .ToString() method and returns an empty string. This will cause the display to be {} as the C# EE wraps the return of .ToString inside of {}'s

like image 191
JaredPar Avatar answered Oct 07 '22 01:10

JaredPar