Reverse Decimal Number using C# and VB.Net in Windows Application

Last Reply 5 months ago By dharmendr

Posted 5 months ago

i am getting data from weight scale machin in Textbox like(5.0021) but i want to change in another textbox my desire output must be like below



Posted 5 months ago

Hi akhter,

Check this example. Now please take its reference and correct your code.


private void btnChange_Click(object sender, EventArgs e)
    string value = textBox1.Text;
    List<char> letters = value.ToCharArray().Reverse().ToList();
    textBox2.Text = string.Join("", letters);


Private Sub btnChange_Click(sender As System.Object, e As System.EventArgs) Handles btnChange.Click
    Dim value As String = textBox1.Text
    Dim letters As List(Of Char) = value.ToCharArray().Reverse().ToList()
    textBox2.Text = String.Join("", letters)
End Sub