Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within General Computing
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
Liutauras Vilda
Jeanne Boyarsky
paul wheaton
Sheriffs:
Ron McLeod
Devaka Cooray
Henry Wong
Saloon Keepers:
Tim Holloway
Stephan van Hulst
Carey Brown
Tim Moores
Mikalai Zaikin
Bartenders:
Frits Walraven
Forums:
C# and .NET
General Computing
Why this program will never stop executing?
Andjela Misic
Greenhorn
Posts: 1
posted 3 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi I'm new to programming and I need help understanding this
Why this program will never stop executing?
public static void Main(string[] args) { int i = 2; while (i > 0) { Console.WriteLine(“FooBar”); } }
Stephan van Hulst
Saloon Keeper
Posts: 15727
368
posted 3 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to CodeRanch!
When should it stop, according to you?
Campbell Ritchie
Marshal
Posts: 79943
396
posted 3 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Moving to our C# forum because it isn't actually a C program. The reason why it is an infinite loop is exactly the same!
[edit]Also added to our general programming forum.
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how do i create and use events in a websocket?
Tokenize a string
Objects (please can someone clear this up)
[Easy] Shift String
Synchronize on int shouldn't be necessairy, should it?
More...