L
Lee
Hello all,
<new to .net>
If the following piece of code:
Private Sub bDice1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bDice1.Click, _
bDice2.Click, bDice3.Click, bDice4.Click, bDice5.Click
Dim btn As New OpenNETCF.Windows.Forms.ButtonEx
btn = CType(sender, OpenNETCF.Windows.Forms.ButtonEx)
MessageBox.Show(btn.Name.ToString())
End Sub
..net reports the name prefixed with an underscore. Isn't a prefixed
underscore a convention to represent member variables of a class? Why
would it report it that way? Of course, Name is a member, but should
it report the name like that to another object using it?
I don't mind stripping the underscore off when I need to, but I figured
I'm doing something wrong...
<new to .net>
If the following piece of code:
Private Sub bDice1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles bDice1.Click, _
bDice2.Click, bDice3.Click, bDice4.Click, bDice5.Click
Dim btn As New OpenNETCF.Windows.Forms.ButtonEx
btn = CType(sender, OpenNETCF.Windows.Forms.ButtonEx)
MessageBox.Show(btn.Name.ToString())
End Sub
..net reports the name prefixed with an underscore. Isn't a prefixed
underscore a convention to represent member variables of a class? Why
would it report it that way? Of course, Name is a member, but should
it report the name like that to another object using it?
I don't mind stripping the underscore off when I need to, but I figured
I'm doing something wrong...