![]() |
|
[C#] Application closes with while loop running? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] Application closes with while loop running? (/showthread.php?tid=5436420) |
Application closes with while loop running? - Baitable - Oct 17, 2016 Hey, I currently have a while loop running in my application (download and execute from link) and it seems that my stub shuts itself down even though I have a while loop running and have not instructed it to close. Code public static void Persistance(FileInfo file) {Code if(persistance) {Code public static bool IsFileinUse(FileInfo file)* - He B TeMy - Oct 18, 2016 Is this your UI thread? (If you have a UI ofc) * - ASMR - Oct 19, 2016 at first I'd suspect that the stream.Close() causes an exception and that makes it fall out of the while loop on exception. but not sure. * - Ninja - Oct 19, 2016 Debug it. See when it exits the loop. |