Would you like to react to this message? Create an account in a few clicks or log in to continue.

    IO SNIPETS

    avatar
    Admin
    Admin


    Posts : 77
    Join date : 2009-07-28

    IO SNIPETS Empty IO SNIPETS

    Post  Admin Sat Oct 17, 2009 5:21 am

    Read last line
    Code:

            public static int ReadID()
            {
                if (File.Exists(Application.StartupPath + "\\event.log"))
                {
                    StreamReader sr = new StreamReader(Application.StartupPath + "\\event.log");
                    String tr = sr.ReadToEnd();
                    tr = tr.Substring(tr.LastIndexOf(Environment.NewLine) - 1);
                    return int.Parse(tr = tr.Substring(0, tr.IndexOf('#')));
                }

      Current date/time is Mon May 20, 2024 10:29 am