public void F(ClassTest st) { //this = st; //error this@ ays depqum hasce e ev hnaravor che poxel Console.WriteLine(this.GetHashCode()); Console.WriteLine(st.GetHashCode()); Test.CalcTax(this); }
static void Main(string[] args) { // Point m; //// p.x = 10; // int x = new int(); // Point p =new Point(); // Console.WriteLine(p); // m.y = 15; // Console.WriteLine(x); // Point p1=new Point(); // Point p2= new Point(); // p1 = p2; // p1.x = 10; // Console.WriteLine(p2.x); StructTest st = new StructTest(10); st.F(st); ClassTest ct = new ClassTest(30); ct.F(ct); Console.ReadKey(); }
public static decimal CalcTax(ClassTest T) { return(T.x); }