"while" Loop Statements

This section describes 'while' loop statements. A 'while' loop statement is similar to a 'for loop statement.

A "for" loop is a "while" statement, which is identical to the "for" statement without the initiation_statement and the iteration_statement. Here is the syntax of a "while" statement:

while statement:
   while (logical_expression) {

When a "for" statement is encountered in an execution flow, it will follow the algorithm bellow:

Comparing the "while" statement with the "for" statement:

Table of Contents

 About This Book

 Introduction of C# (C Sharp)

 Data Type and Variables

 Logical Expressions and Conditional Statements

Arrays and Loop Statements

 Creating and Using Arrays

 Creating and Using Arrays - Example

 "for" Loop Statements

"while" Loop Statements

 Data Type Features

 Floating-Point Data Types

 Passing Parameters to Methods

 Execution Environment Class

 Visual C# 2010 Express Edition

 Class Features

 C# Compiler and Intermediate Language

 Compiling C# Source Code Files

 MSBuild - Microsoft Build Engine

 Memory Usages of Processes

 Multithreading in C#

 Async Feature from C# 5

 System.IO.FileInfo Class

 System.Diagnostics.FileVersionInfo Class

 WPF - Windows Presentation Foundation

 Partial Classes and Partial Methods

 Outdated Tutorials


 Full Version in PDF/ePUB