Can anyone tell me how I can convert the following code to csharp? I'm
having problems with this because it seems as though KeyChar.IsDigit
doesn't exist in csharp.
----------------------------------------------------
Private Overloads Sub TextBox1_TextChanged(ByVal sender As
System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
Handles TextBox1.KeyPress
Dim isKey As Boolean = e.KeyChar.IsDigit(e.KeyChar)
Dim isDecimal As Boolean = e.KeyChar.ToString = "."
If Not isKey And Not isDecimal Then
e.Handled = True
End If
End Sub
----------------------------------------------------
Regards,
Aaron Prohaska
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-
Wrench Science Inc.
http://www.wrenchScience.com/
Phone: 510.841.4748 x206
Fax: 510.841.4708
-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-/-