Archived
1
0
This repository has been archived on 2026-03-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SomeLab/15_5/Program.cs
2025-11-15 20:25:57 +08:00

20 lines
563 B
C#

using System;
using System.Text;
namespace _15_5
{
internal class Program
{
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder("ABC", 50);
sb.Append(new char[] { 'D', 'F', 'E' });
sb.AppendFormat("GHI{0}{1}", 'J', 'k');
Console.WriteLine("{0} chars,内容为{1}", sb.Length, sb.ToString());
sb.Insert(0, "Alphabet---");
sb.Replace('k', 'K');
Console.WriteLine("{0} chars,内容为{1}", sb.Length, sb.ToString());
}
}
}