C# visual studio 2015. I have a text box. I do not want to write more than two decimal value. I have tried like this:
private void txtAPenPension_TextChanged(object sender, EventArgs e)
{
if (System.Text.RegularExpressions.Regex.IsMatch(txtAPenPension.Text, " ^ [0-9]"))
{
txtAPenPension.Text = "";
}
} 
Amit GuptaRank #190 · 12.8K reputationPosted Aug 18, 2017, 10:28 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Aug 18, 2017, 1:43 PM EDT
Shovan SahaRank #4,546 · 338 reputationPosted Aug 18, 2017, 2:08 PM EDT