c# - Save CheckBox state to xml -
my application form based application, having multiple textboxes can filled. textboxes optional , checkbox included toggle if should included.
now save progress of form can opened later further editing. saving file .xml
. saving textboxes have no problem with, best way save state of checkboxes .xml
file, can loaded later?
i can use - string s = bool.tostring();
. work when working lot of checkboxes can become long process. have class
handles saving of .xml
file. there way add more 1 checkbox list parse "true/false"
value class array of bool[]
?
checkbox-state nothing else boolean? -> nullable bool. can simple serialize using xmlserializer or write manually file:
string s = checked.tostring();
and parse it:
bool checked = boolean.parse(s)
Comments
Post a Comment