总是出错,不知道什么原因,,,,,
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string str1 = "C#编程宝典";
string str2=str1.PadLeft(str1.Length+1 ,'<<');
string str3 = str2.PadRight(str2.Length+1,' >>');
Console.WriteLine("填充字符串之前:"+str1);
Console.WriteLine("填充字符串之前:"+str3);
Console.ReadLine();
}
}
}