10-20-2011، 06:15 PM
(آخرین تغییر در ارسال: 10-20-2011، 07:46 PM توسط Amin_Mansouri.)
[c#] save a listbox to file
Code:
Code:
کد:
> public void saveConfig(ListBox list)
{
try
{
writer = new StreamWriter(Application.StartupPath + "my.filename.goes.here");
for (Int32 i = 0; i < list.Items.Count; i++)
{
writer.WriteLine(list.Items[i].ToString());
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
finally
{
writer.Close();
}
}
گروه دور همی پارسی کدرز
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg
https://t.me/joinchat/GxVRww3ykLynHFsdCvb7eg