Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
9
Task/Copy-a-string/Visual-Basic-.NET/copy-a-string-1.vb
Normal file
9
Task/Copy-a-string/Visual-Basic-.NET/copy-a-string-1.vb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
'Immutable Strings
|
||||
Dim a = "Test string"
|
||||
Dim b = a 'reference to same string
|
||||
Dim c = New String(a.ToCharArray) 'new string, normally not used
|
||||
|
||||
'Mutable Strings
|
||||
Dim x As New Text.StringBuilder("Test string")
|
||||
Dim y = x 'reference
|
||||
Dim z = New Text.StringBuilder(x.ToString) 'new string
|
||||
2
Task/Copy-a-string/Visual-Basic-.NET/copy-a-string-2.vb
Normal file
2
Task/Copy-a-string/Visual-Basic-.NET/copy-a-string-2.vb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
Dim a As String = "Test String"
|
||||
Dim b As String = String.Copy(a) ' New string
|
||||
Loading…
Add table
Add a link
Reference in a new issue