c# kaldıgı numaradan devam etmek için kodlar..
private void SonIDOku()
{
try
{
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
string str2 = "";
if (File.Exists(folderPath + @"\lastid.txt"))
{
StreamReader reader = new StreamReader(folderPath + @"\lastid.txt");
str2 = reader.ReadLine();
reader.Close();
this.index_value = Convert.ToInt32(str2);
}
else
{
this.index_value = 0;
}
}
catch (Exception)
{
this.index_value = 0;
}
}
private void SonIDYaz()
{
try
{
string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
File.Create(folderPath + @"\lastid.txt").Close();
TextWriter writer = new StreamWriter(folderPath + @"\lastid.txt", true);
int num = this.index_value + 1;
writer.Write(num);
writer.Close();
}
catch (Exception)
{
}
}