/
aprogrammer
/
dotnet-docs
Обзор
Документация
Войти
/
aprogrammer
/
dotnet-docs
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
samples/snippets/visualbasic/VS_Snippets_CLR/Conceptual.StringBuilder/vb/example2.vb
21 строка
625 B
Next Turn
Format codes based on .editorconfig, Part 6 (#18869)
11 июн 2020, 17:41
Не верифицирован
11 июн 2020, 17:41
008c5b8
Код
Авторство
О чём код?
'<snippet9> Imports System.IO Imports System.Text Public Class CharsToStr Public Shared Sub Main() Dim sb As New StringBuilder("Start with a string and add from ") Dim b() As Char = {"c", "h", "a", "r", ".", " ", "B", "u", "t", " ", "n", "o", "t", " ", "a", "l", "l"} Using sw As StringWriter = New StringWriter(sb) ' Write five characters from the array into the StringBuilder. sw.Write(b, 0, 5) Console.WriteLine(sb) End Using End Sub End Class ' The example has the following output: ' ' Start with a string and add from char. '</snippet9>