S
Ste
Hi all,
I usually use VB.Net, but I tryed to write a WindowsCE application with c#
and I've found a strange bug...I'd like to know if it is a Visual Studio
2003 bug or I write something wrong (or is a problem of my VS
installation...unfortunately I haven't another pc to test it!).
The problem is this: in the form created by VS I put a TextBox and a Button;
on Button Click routine, I write this code:
private void button1_Click(object sender, System.EventArgs e)
{
this.Test (this.textBox1.Width);
}
public void Test(int Value)
{
System.Windows.Forms.MessageBox.Show(Value.ToString());
}
If I put a breakpoint on Button1_Click routine, I can step into Test
routine normally pressing F11 key.
But if I create a new class (Class1) and move the Test routine into it, and
change button1_click routine in this way:
private void button1_Click(object sender, System.EventArgs e)
{
Class1 myClass;
myClass = new Class1();
myClass.Test(this.textBox1.Width);
}
when I try to step into Test routine of myClass, it doesn't work (obviously
I still have the breakpoint in button1_Click routine)!!
The only way to step into Test routine from button1_Click is to put a
breakpoint also into Test routine!!
In this sample I used Width property of TextBox, but I get the same
behaviour with other properties: for example, with Text property 'step into'
doesn't work, but if I write Text.ToString(), I can step into again!!!
Sorry for the length of the post and bad english....but anybody else has the
same problem???
I usually use VB.Net, but I tryed to write a WindowsCE application with c#
and I've found a strange bug...I'd like to know if it is a Visual Studio
2003 bug or I write something wrong (or is a problem of my VS
installation...unfortunately I haven't another pc to test it!).
The problem is this: in the form created by VS I put a TextBox and a Button;
on Button Click routine, I write this code:
private void button1_Click(object sender, System.EventArgs e)
{
this.Test (this.textBox1.Width);
}
public void Test(int Value)
{
System.Windows.Forms.MessageBox.Show(Value.ToString());
}
If I put a breakpoint on Button1_Click routine, I can step into Test
routine normally pressing F11 key.
But if I create a new class (Class1) and move the Test routine into it, and
change button1_click routine in this way:
private void button1_Click(object sender, System.EventArgs e)
{
Class1 myClass;
myClass = new Class1();
myClass.Test(this.textBox1.Width);
}
when I try to step into Test routine of myClass, it doesn't work (obviously
I still have the breakpoint in button1_Click routine)!!
The only way to step into Test routine from button1_Click is to put a
breakpoint also into Test routine!!
In this sample I used Width property of TextBox, but I get the same
behaviour with other properties: for example, with Text property 'step into'
doesn't work, but if I write Text.ToString(), I can step into again!!!
Sorry for the length of the post and bad english....but anybody else has the
same problem???