StrReverse Function in VB.NET

How to use the StrReverse in function in VB.NET?

Explanation

StrReverse Function

StrReverse Function in Visual Basic.net 2008 is used to return a string with the character reversed.
Syntax:

Function StrReverse(ByVal Expression As String) As String

In the above syntax String is the string whose characters are reversed.
Example:

Module Module1
Sub Main()
Dim Str1 As String = "STPIRCSH"
Console.WriteLine("Reversed string is:: " & StrReverse(Str1))
Console.ReadLine()
End Sub
End Module
Result:

Reversed string is:: HSCRIPTS

In the above example, the string is reversed using the StrReverse function to return 'HSCRIPTS'.

Visual Basic Tutorial


Ask Questions

Ask Question