// Program.cs
public static class EMClass
{
 public static int ToInt32Ext(this string s)
 {
  return Int32.Parse(s);
 }
 public static int ToInt32Static(string s)
 {
  return Int32.Parse(s);
 }
}
class Program
{
 static void Main(string[] args)
 {
  string s = "9";
  int i = s.ToInt32Ext(); // LINE A
  Console.WriteLine(i);
  int j = EMClass.ToInt32Static(s); // LINE B
  Console.WriteLine(j);
  Console.ReadLine();
 }
}

相关文章:

  • 2021-06-01
  • 2021-09-04
  • 2021-11-29
  • 2021-11-26
  • 2021-07-16
  • 2021-08-04
  • 2021-08-19
  • 2022-12-23
猜你喜欢
  • 2021-08-20
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
相关资源
相似解决方案