csharp convert random numbers in textBox to currency
Code Example - csharp convert random numbers in textBox to currency
public void textchange(object sender, EventArgs e)
{
if(textbox1.Text.Contains("%%%~COMPRESS~PRE~0~%%%quot;))
{
string valueToConvert = textbox1.Text.replace("%%%~COMPRESS~PRE~0~%%%quot;,"");
double newVal = Convert.ToDouble(valueToConvert);
//Assign the new value with $ to textbox1
textbox1.Text = "%%%~COMPRESS~PRE~0~%%%quot;+Convert.ToString(newVal);
}
}