How to VB.NET String.Length()

The Length() function in String Class returned the number of characters occurred in a String.


  1. Integer : The number of characters in the specified String.

For ex:

"This is a Test".Length() returns 14.

Public Class Form1
    Private Sub Button1_Click(ByVal sender As System.Object, _
    ByVal e As System.EventArgs) Handles Button1.Click
        Dim str As String
        str = "This is a Test"
    End Sub
End Class

When you execute this source code you will get 17 in the messagebox. (C) 2021    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About