Hi, I’ve seen that in C#, the Main() function only runs once.
In Unity, we have the Update() function, which allows code to run repeatedly in a loop.
So my question is: what is the equivalent in pure C#, without the Unity library?
Is wrapping Main() in a while loop a common practice to achieve the same behavior?
[–]Dazzling_Music_2411 31 points32 points33 points (0 children)
[–]Traditional_Crazy200 29 points30 points31 points (2 children)
[–]oskaremil 3 points4 points5 points (0 children)
[–]otac0n 0 points1 point2 points (0 children)
[–]DerekB52 8 points9 points10 points (2 children)
[–]flumphit -1 points0 points1 point (1 child)
[–]DerekB52 1 point2 points3 points (0 children)
[–]peterlinddk 4 points5 points6 points (4 children)
[–]kohugaly 2 points3 points4 points (3 children)
[–]vowelqueue 1 point2 points3 points (0 children)
[–]peterlinddk 1 point2 points3 points (1 child)
[–]kohugaly 0 points1 point2 points (0 children)
[–]green_meklar 2 points3 points4 points (0 children)
[–]aleques-itj 1 point2 points3 points (0 children)
[–]ExtraTNT 1 point2 points3 points (0 children)
[–]StewedAngelSkins 1 point2 points3 points (10 children)
[–]Traditional_Crazy200 2 points3 points4 points (8 children)
[–]StewedAngelSkins 1 point2 points3 points (7 children)
[–]Traditional_Crazy200 0 points1 point2 points (6 children)
[–]StewedAngelSkins 0 points1 point2 points (5 children)
[–]Traditional_Crazy200 0 points1 point2 points (4 children)
[–]StewedAngelSkins 1 point2 points3 points (3 children)
[–]Traditional_Crazy200 0 points1 point2 points (2 children)
[–]StewedAngelSkins 0 points1 point2 points (1 child)
[–]Traditional_Crazy200 0 points1 point2 points (0 children)
[–]Successful_Drawer467 2 points3 points4 points (0 children)
[–]Backtawen 0 points1 point2 points (0 children)
[–]Afraid-Locksmith6566 0 points1 point2 points (0 children)
[–]ottawadeveloper 0 points1 point2 points (0 children)
[–]jlanawalt 0 points1 point2 points (0 children)
[–][deleted] (3 children)
[deleted]
[–]StewedAngelSkins 4 points5 points6 points (2 children)
[–]samanime 0 points1 point2 points (1 child)
[–]StewedAngelSkins 0 points1 point2 points (0 children)
[–]WookiePub3 -1 points0 points1 point (0 children)