class Element
{
public Rectangle rect{ get; set; }
}
class Displayable
{
public Element element{ get; set; } //Вот ту т неправильно
public Color color{ get; set; }
public bool visible{ get; set; }
}
var first = new FirstClass(); //у этого класса значения не меняются
var second = new SecondClass();
second.First = first;
second.ChangeValue(42);
Console.WriteLine(first.Value); // Выведет 42
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column2,
this.Column1});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 15);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.dataGridView1.RowTemplate.Height = 25;
this.dataGridView1.Size = new System.Drawing.Size(208, 377);
this.dataGridView1.TabIndex = 4;