Wednesday 12 March 2014

Find Last Character of Given String using VB.NET

======================This is the Code
Dim str As String = "abcd"
        Dim ss As String = str(str.Length - 1)
===========================================
output :d
=============if we want 'c' of given string then we use-
Dim str As String = "abcd"
        Dim ss As String = str(str.Length - 2)
==================================
output :c
======================================

No comments:

Post a Comment

Followers