Hi,
Please try below code
C#
string wholeVIN = "Ass5125ss8uhh";
string lastFourOfVIN = wholeVIN.Substring(wholeVIN.Length - 4, 4);
OR
string wholeVIN = "Ass5125ss8uhh";
string lastFourOfVIN = wholeVIN.Substring(wholeVIN.Length - 4, wholeVIN.Length - (wholeVIN.Length - 4));
VB
Dim wholeVIN As String = "Ass5125ss8uhh"
Dim lastFourOfVIN As String = wholeVIN.Substring(wholeVIN.Length - 4, 4)
OR
Dim wholeVIN As String = "Ass5125ss8uhh"
Dim lastFourOfVIN As String = wholeVIN.Substring(wholeVIN.Length - 4, wholeVIN.Length - (wholeVIN.Length - 4))
I hope this will help you out.