static void RefPassByValue() { ShapeInfo info1 = new ShapeInfo("info1"); info1.Display(); RefPassByValueModify(info1); info1.Display(); RefPassByRefModify(ref info1); info1.Display(); }
static void RefPassByValueModify(ShapeInfo info) { info.InfoString = "infoString_modified"; info = new ShapeInfo("info_modified!"); }
static void RefPassByRefModify(ref ShapeInfo info) { info.InfoString = "infoString_modified"; info = new ShapeInfo("info_modified!"); //info.InfoString = "infoString_modified"; }
public Rectangle(string info, int left, int right, int top, int bottom) { Left = left; Right = right; Top = top; Bottom = bottom; SInfo = new ShapeInfo(info); }