serialization of checkbox
Hi i have a couple of checkboxes, how do i go about serialize them?
I have a class that declares other variables to be serialized:
public class FormSaving
        {
            public string Majorversion
            {
                get;
                set;
            }
            public string Minorversion
            {
                get;
                set;
            }
            public int Buildstartingmail
            {
                get;
                set;
            }
where my Buildstartingmail is to be assigned to the BuildstartingmailcheckBox.
how should i do it?
i was thinking of using something like
abc.Buildstartingmail = BuildstartingmailcheckBox.SelectedIndex
but there is no such o开发者_运维问答ption as "SelectedIndex"
There are plenty solutions :
- You can save checkbox's index in Conrolcollection
- You can store checkboxes in dictinary and save keys
- You can save checkbox's name
- You can use Tagproperty of checkbox to store unique id and then save that id
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论