So i have this code:
Initially the code runs once as expected.Code:static void Main(string[] args) { Console.Title = "Dungeon Defenders Mana Hack"; SetUp(); } static void SetUp() { Process[] processes; processes = Process.GetProcessesByName("DunDefGame"); if (processes.Length > 0) { Write(processes); } else { Console.WriteLine("Could Not Find Game Process, Please Launch Dungeon Defenders."); Console.WriteLine("Press any key to retry"); Console.WriteLine("\n"); Console.Read(); System.Threading.Thread.Sleep(1000); SetUp(); } }
BUT when i hit a key to run SetUp() again it runs it twice instead of once. (At this point it has ran 3 times, once initially and twice the second time)
Results 1 to 5 of 5
Thread: C# Code Being Ran Twice
Threaded View
- 25 Dec. 2014 03:44am #1
C# Code Being Ran Twice
There's nothing ideal about being real, there's so many flaws to cover and conceal.