Monday 12 March 2012

vb.net string copyto()t?


How to string copyto() in vb.net?
I this tutorial you can learn how to string copy to (copy one string to another one),the syntax of string copy is string.copy(string str)
Here : Stràgiven string
String à string data type

Ex: str = string.copy(str1)
Copy the str1 string into str2

  To do this program following steps to be followed
Step1:
Open Microsoft visual studio 2010 or any older version also may differ commands
Step2:
Open file new project(ctrl+shift+n)àselect windows form applicationà rename as you wish
Step3:
Drag and drop two label, textbox, and one button
Label1.textà1st string
Label2.textà2nd string
Buttonàcopy
Step4:
Copy and paste the following code
Public Class Form1
   
    Private SubButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesButton1.Click
        Dim ststring As String = TextBox1.Text
        Dim ndbstring As String
        ndbstring = String.Copy(ststring)
        TextBox2.Text = ndbstring
    End Sub
End Class


 Output:


2 comments:

  1. are there differences between your method and just doing:

    ndbstring = ststring

    ?

    ReplyDelete
    Replies
    1. no but,here i'm use to show that, how to use "copyto()" function

      Delete