I m a beginner trying to learn Visual C#(Visual Studio 2008). I was able to run a simple Visual C# program without errors.
I was trying to look at the values of the variables in the DATA TIP in Break Mode.. by hovering over the variable. I have not been able to see the value of the variable in the code. Am i missing anything ?
I did the Debug in Debug Mode and not Release Mode.

Any help will be very appreciated

Thanks

Is the variable in scope that you are trying to view? Also, if the code is optimized it may not show.

Welcome C#Beginner to DANIWEB!
What do you mean by DATA TIP in Break Mode?
If you hover over a variable, and you don't see anything it probably means tha the variable is out of scope.

This is the code.. They are definitely not out of scope.

private void button1_Click(object sender, EventArgs e)
    {
        int a,b;
        a =  int.Parse(textBox1.Text);
        b = int.Parse(textBox2.Text);
        int c = a + b;
        textBox3.Text = c.ToString();

    }

This is the code.. They are definitely not out of scope.

private void button1_Click(object sender, EventArgs e)
        {
            int a,b;
            a =  int.Parse(textBox1.Text);
            b = int.Parse(textBox2.Text);
            int c = a + b;
            textBox3.Text = c.ToString();
                     
        }// breakpoint

So, you have a breakpoint such as commented above on the closing brace, but still cannot see the vars values when hovering?

Thanks Guys..
The MSDN said variable values should be reflected in "BREAK MODE". So I was doing DEBUG--> BREAK ALL :-(.
The BreakPoint worked. I will try learning abt Watch windows and other Debugging stuff now.
Got the lesson..
Thanks again

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.