Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42731

VS 2010 [RESOLVED] Add Hyphen To String

$
0
0
Ok, another question. :)

I have a function that returns a string:

Code:

Private Function GenerateString() As String
        Dim GeneratedString As String = String1
        Return GeneratedString
    End Function

String1 is always a randomized 10 characters. Like: FQUWJFLQID

So, at form load, I want to add a hyphen after the first 5 letters. It would be like this:

Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
Label1.Text = String1 'Turns into this: FQUWJ-FLQID.
End Sub

Possible? Thanks!

Viewing all articles
Browse latest Browse all 42731

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>