Flag serialization

Hi, I have a couple of flags, how do I serialize them?

I have a class that declares serialization of other variables:

public class FormSaving
        {
            public string Majorversion
            {
                get;
                set;
            }
            public string Minorversion
            {
                get;
                set;
            }
            public int Buildstartingmail
            {
                get;
                set;
            }

where my Buildstartingmail should be bound to the BuildstartingmailcheckBox block.

How should I do it?

I was thinking about using something like

abc.Buildstartingmail = BuildstartingmailcheckBox.SelectedIndex

but there is no such option as "SelectedIndex"

+3
source share
1 answer

There are many solutions:

  • You can save the flag index in the collection Conrol
  • You can store checkboxes in voice recorder and save files.
  • You can save the flag name
  • You can use the Tagcheckbox property to store a unique identifier and then keep its id
+2
source

Source: https://habr.com/ru/post/1794640/


All Articles