Advertisement
bero_0401

StringBuilder

Aug 16th, 2024
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | Source Code | 0 0
  1.  
  2. using Microsoft.VisualBasic;
  3. using System.Text;
  4.  
  5. namespace CsharpCourse
  6. {
  7.     internal class Program
  8.     {
  9.         static void Main(string[] args)
  10.         {
  11.             StringBuilder sb = new StringBuilder();
  12.             sb.Append("hello");
  13.             sb.AppendLine(" world");
  14.             sb.Append("my name is abeer");
  15.  
  16.             Console.WriteLine(sb.ToString());
  17.  
  18.             Console.WriteLine(sb.Length);
  19.             Console.WriteLine(sb.Capacity);
  20.             Console.WriteLine(sb.MaxCapacity);
  21.  
  22.            
  23.         }
  24.     }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement