ShawnKY

Yes, the noob is back again, this time with a reversing text question.

This is the code I tried, but, it is not working. My message box shows System.Char[] for output. What is it I am doing wrong here

Code Snippet

Dim UserText As String
Dim ReversedText As String

UserText = txtUsertext.Text

Dim UserArray As Array = UserText.ToCharArray
UserArray.Reverse(UserArray)
ReversedText = Convert.ToString(UserArray)
MessageBox.Show(ReversedText)

Thanks for any help,

Shawn

And yes I am using VB.NET 2003, that's what my college teaches us with.



Re: Windows Forms General Reverse text in VB .NET 2003

nobugz

Dim UserText As String = "Nobugz waz here"
Dim UserArray() As Char = UserText.ToCharArray
Array.Reverse(UserArray)
Dim ReversedText As String = New String(UserArray)
MessageBox.Show(ReversedText)

Next time, please post VB.NET questions in one of the Visual Basic forums.