namespace BenJi
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("你要调试程序吗?yes/no");

string u = Console.ReadLine();
if (u == "yes")
{
string str = "1234567890";

Console.WriteLine(str.top6());  //输出  123456

}
Console.ReadLine();
}
}
public static class MyExtensions
{
public static string top6(this String str)
{
return str.Substring(0,6);

}
} 
}

 

相关文章:

  • 2022-01-21
  • 2021-07-17
  • 2021-06-02
  • 2021-09-01
  • 2021-12-20
  • 2021-12-28
  • 2022-12-23
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2021-06-19
  • 2022-12-23
相关资源
相似解决方案