I recently started learning C #, and so far, unfortunately, I don’t know all the subtleties and possibilities. I study in principle through trial and error, and sometimes I look in Google for searching for an answer. So, I come to the question: is it possible to set child variables in C # of controls? I make a simple tabbed text editor, and I need to assign a mutable isSaved flag to each tab item RichTextBox for manipulations. I will try to give an example of what I want:
RichTextBox TE = new RichTextBox() { Dock = DockStyle.Fill, Name = "text_edit", Location = new Point(3, 3), Text = content, Font = Properties.Settings.Default.GlobFont, Margin = new Padding(3, 3, 3, 3), /* а вот и то, что мне нужно */ bool isSaved; /* собственное значение */ };
isSavedfield, as well as the contents of the document (and, possibly, more fields). - VladD