5

I'd like to know how should I do to test simple C# expressions

1) in Visual Studio and
2) not in debug, in design mode

Say, I want to verify what will return this code

?DateTime.ParseExact("2016", "yyyy")

Or

int i;
int.TryParse("x55", out i);
?i

I obtained in the immediate window the following message:

?DateTime.ParseExact("2016", "yyyy") 
The expression cannot be evaluated while in design mode.
4

4 に答える 4