this is a very simple example of what is happening when I use a breakpoint on
the
textBox1.Text = aString.IndexOf(",",0).ToString(); Line
private void button1_Click(object sender, System.EventArgs e)
{
string aString;
aString = "Testing Index of, In a Watch";
textBox1.Text = aString.IndexOf(",",0).ToString();
}
putting a watch on the aString.IndexOf(",",0).ToString()
returns the following in the watch window while in breakmode
aString.IndexOf(",",0).ToString() error: 'aString.IndexOf' does not exist
cheers
PeteMc
"Rakesh Rajan" wrote:
Hi PeteMc,
The debugger windows need to be in the same scope of the variable where it
is declared to work. So, put a breakpoint within this scope and try.
HTH,
Rakesh Rajan
"PeteMc" wrote:
Hi I'm new to c# and .net from a vb6 background and i'm having issues with
the debugging of applications
I am trying to create a watch on an expression
aString.IndexOf(",",0).ToString()
but either in the watch window or the immediate window I get an out of scope
Error
however if the program runs through it returns a value.
Has anyone got an idea of what I am doing wrong