class Program
{
static void Main(string[] args)
{
double v1 = 123;
double p1 = v1.zzzzz();
System.Console.WriteLine(p1);
//--
double p2=(1234567890.123).zzzzz();
System.Console.WriteLine(p2);
}
}
static class myExtension
{
public static double zzzzz(this double d)
{
return d/2 ;
}
}
本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2011/04/20/2023045.html,如需转载请自行联系原作者