G
Guest
Why it's not possible to override operator "=" in C#? I have Class - Class1
with one property Prop1. For example
Class1 x = new Class1(); x.Prop1 = "this is x";
Class1 y = new Class1(); y.Prop1 = "this is y";
y = x;
now these (x and y) are two variables looking on one object :[ - changing
one object another object is aleready changing
I need a class which will JUST gather a variables from another class (such
as System.String). I'ts important to use exactly "=" operator, not an
property or IConvertible.Convert()
Thanks a lot, sory about english.
with one property Prop1. For example
Class1 x = new Class1(); x.Prop1 = "this is x";
Class1 y = new Class1(); y.Prop1 = "this is y";
y = x;
now these (x and y) are two variables looking on one object :[ - changing
one object another object is aleready changing
I need a class which will JUST gather a variables from another class (such
as System.String). I'ts important to use exactly "=" operator, not an
property or IConvertible.Convert()
Thanks a lot, sory about english.