הערה
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות להיכנס או לשנות מדריכי כתובות.
הגישה לדף זה מחייבת הרשאה. באפשרותך לנסות לשנות מדריכי כתובות.
This example constructs a long string from many smaller strings using the StringBuilder class. The StringBuilder class is more efficient than the &= operator for concatenating many strings.
Example
The following example creates an instance of the StringBuilder class, appends 1,000 strings to that instance, and then returns its string representation:
Private Function StringBuilderTest() As String
Dim builder As New System.Text.StringBuilder
For i As Integer = 1 To 1000
builder.Append("Step " & i & vbCrLf)
Next
Return builder.ToString
End Function
See also
שתף איתנו פעולה ב- GitHub
ניתן למצוא את המקור לתוכן זה ב- GitHub, שם ניתן גם ליצור ולסקור בעיות ולמשוך בקשות. לקבלת מידע נוסף, עיין במדריך התורמים שלנו.