string - VB.NET display letters of a word under eachother in a label -



string - VB.NET display letters of a word under eachother in a label -

dim intlength, intteller integer dim strback, strtext string

strtext = txtinvoer.text intlength = txtinvoer.text.length intlength = 1 intlength lblletterperletter.text &= strtext.substring(0, intlength) & vbcrlf next intteller = 0 strtext.length - 1 lblondermekaar.text &= strtext.chars(intteller).tostring next

how display let's name under eachoter? ex.

s

h

a

w

n

you can utilize string.join:

lblletterperletter.text = string.join(environment.newline, "shawn".asenumerable())

you need utilize asenumerable() treat string ienumerable(of char), otherwise it's treated single string. declare ienumerable(of char) in first place:

dim namechars ienumerable(of char) = "shawn" lblletterperletter.text = string.join(environment.newline, namechars)

vb.net string

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -