Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

visual studio 2010

I want to use visual studio 2010 Immediate window to view the result. What do i need to do?


namespace something
{
public class DLPayment
    {
      public string testme()
            {
            return "hello";
            }
    }
}
Avatar of kaufmed
kaufmed
Flag of United States of America image

View what result? What code are you debugging? A class by itself can't be debugged. You have to be executing some code first.
Avatar of ITsolutionWizard

ASKER

send me some codes  I can use with immediate window. I want to learn how it works.
My goal is to get quick result to test some methods inside of the .cs file.
The Immediate Window lets you either execute or inspect code that is in scope. You can execute code by simply typing it into the window. For example, in the first line I execute GetGreeting. The output, if any, is output just below it. If you want to inspect the value of some variable, or even some function call, then you can prefix the code with a question mark, as I did in line 3. The output of the a_private_variable is output just after.


User generated image
ASKER CERTIFIED SOLUTION
Avatar of ChloesDad
ChloesDad
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial