KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following code in a view model: public Point Location { get { var rangePixels = Range * PixelsPerMile; var xCoordinate = OwnLocation.X * MapScale + rangePixels * Math.Cos(Theta); var yCoordinate = OwnLocation.Y * MapScale - rangePixels * Math.Sin(Theta); return new Point(xCoordinate, yCoordinate); } } One of the usings at the top of the code file is System , which contains Math . If I view Math.Sin(Theta) in the Watch window (by selecting the code, right clicking, and choosing "Add Watch"), I get the following error: The name 'Math' does not exist in the current context What I want to know is: Is this expected/default behavior for Visual Studio 2010? I could swear this never used to be a problem, but maybe it's always worked that way and I somehow never noticed. If it's not normal to get this error, any thoughts on what the problem could be? There are a million settings in Visual Studio, and I wouldn't know where to begin. I should note this question is vaguely similar to this , but I'm not having any issues mousing over my local variables, and I'm not using PostSharp. Edit I just tried resetting all my Visual Studio settings backs to default, and I'm still getting the same error. If someone wants to try a simple test in Visual Studio, I just want to know if you get an error if you add a watch for Math.Sin(1) . Edit 2 Here are a couple screen captures to show what I'm experiencing: <stron
Tags (comma-separated)
Save Edits
Cancel