Monday, 12 March 2012

vb.net get string length?


How to get string length in vb.net?
 In this tutorials you can learn how to get string length in by use length () sign. The length of string in integer number
To make this go to below steps
Step1:
Start Microsoft visual studio 2010
Step2:
File new àwindows forms application àRename it as you wish then form drag and drop button. Double click the button and copy and paste code .
Step3:
 Code:
Public Class Form1

    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        Dim textstring As String
        textstring = TextBox1.Text
        MessageBox.Show("the length of string:  " & textstring.Length())
    End Sub
End Class

Output:






No comments:

Post a Comment