Reverse a String in VB.NET

In this tutorial, we will create an application on how to Reverse a String in VB.NET. First, Go to Microsoft Visual Studio, go to File Menu, click New Project, and choose Windows Form Application. Now, create two textboxes with the default name of TextBox1 and Textbox2. Textbox1 will be used as our string input and Textbox2 for displaying the reversed string result. Have also one button and named it as Button1. The design will be like this one: Reverse Next, have this code on your Form_Load. This will disable the TextBox2 to be typed because it will be used as the output for a reversed string. TextBox2.Enabled = False From, this click Button1 and have this code:
  1.         Dim s As String
  2.         Dim r As String
  3.         s = TextBox1.Text
  4.         r = StrReverse(s)
  5.         TextBox2.Text = r
  6.     End Sub
The StrReverse syntax is our main code for reversing a string as we passed the value inputted in text one and then display the input in Textbox2. Type "www.sourcecodster.com". The result will look like this: Final output Download the source code below and try it! :) For more inquiries and need programmer for your thesis systems in any kind of programming languages, just contact my number below. Best Regards,

Engr. Lyndon R. Bermoy
IT Instructor/System Developer/Android Developer
Mobile: 09079373999
Telephone: 826-9296
E-mail:[email protected]

Visit and like my page on Facebook at: Bermz ISware Solutions

Subscribe at my YouTube Channel at: SerBermz

Add new comment