Right Function in VB.NET
How to use the Right Function in VB.NET?
Explanation
Right Function
Right() String Function in Visual Basic.net 2008 is used to return a string with the specified number of character
from the right of the string.
Syntax:
Function Right(ByVal str As String,
ByVal Length As Integer) As String
In the above syntax,
String specifies the string, to get the number of
characters specified
Length from the right most of the string.
Example:
Module Module1
Sub Main()
Dim Str As String = 'RETURN for RIGHT Function'
Console.WriteLine('String returned is::' & Right(Str, 14))
Console.ReadLine()
End Sub
End Module
Result:
String returned is:: RIGHT Function
In the above example, '14' characters from the left are returned using the Right function.