Current .Net Version: 1.1.4322
Home
Articles
Practice C# Online
C# Reference
XML Web Services
RSS Feeds
T-SQL Scripts
Valuable Links
Contact Us
C# Reference
List: Search:

do
Is a:Statement Keyword
Applies to Version:C# 1.0 and later
Namespace:N/A
Assembly:N/A (N/A)
Description:Executes a statement continuously until a specified expression evaluates to false. Be aware that the do block of code if executed before the while expression is evaluted - this means the do block of code will execute at least one time.
Syntax:
do statement while (expression);
Example(s): int i = 0; do { i ++; } while (i <= 9); MessageBox.Show(i.ToString()); // will print "10"
 
COPYRIGHT/DISCLAIMER | CONTACT US