必须是静态类的静态方法 参数必须使用this指定是哪种类型的拓展方法
public static class Common { public static int ToInt(this object val,int a) { int i = 0; try { i = Convert.ToInt32(val); } catch{} return i; } }
必须是静态类的静态方法 参数必须使用this指定是哪种类型的拓展方法
public static class Common { public static int ToInt(this object val,int a) { int i = 0; try { i = Convert.ToInt32(val); } catch{} return i; } }