public void ReferenceType() { valueVSreference x1 = new valueVSreference(); x1.A = 5; x1.B = 10; valueVSreference x2 = x1; valueVSreference x3 = x2; x3.B = 100; //changes x1 x2 and x3 B value, because they all point to the same data Console.WriteLine(x2.B); }
static void Main(string[] args) { //var pk = new ParamsKeyword(); //pk.PK(1, 2, 3, 4, 5, 6, 7, 8, 9); //pk.PK(); //pk.PK(1000, 212, 3155, 4841, 11); //var op = new OutParameter(); //op.OP(); var vr = new valueVSreference(); vr.ValueType(); vr.ValueTypeRef(); vr.ReferenceType(); }