ApprovalTests.Utilities.TestCounter.Increment C# (CSharp) Method

Increment() public static method

public static Increment ( string file ) : void
file string
return void
        public static void Increment(string file)
        {
            long count = 0;
            if (File.Exists(file))
            {
                Int64.TryParse(File.ReadAllText(file), out count);
            }
            count++;
            File.WriteAllText(file, "" + count);
        }