void desera() { BinaryFormatter binformat = new BinaryFormatter(); try { Stream stream = new FileStream(@"C:\Users\Илья\Desktop\bindata.bin", FileMode.Open, FileAccess.ReadWrite, FileShare.None); userSettings us = (userSettings)binformat.Deserialize(stream); stream.Close(); users = us; foreach (string i in users.getNames()) { comboBox1.Items.Add(i); } } catch (Exception e) { } }
public Form2() { InitializeComponent(); users = new userSettings(); }
public Form6(userSettings uset) { etiuseri = uset; }