Add looping logic to your code using the do-while and while statements in C#
Use the do-while and while statements to iterate as long as a Boolean expression evaluates to true.
Learning objectives
After you complete this module, you'll be able to:
Write code that uses the do-while statement to iterate through a code block
Write code that uses the while statement to iterate through a code block
Use the continue statement to step directly to the Boolean evaluation
Thêm
Prerequisites
Experience using Visual Studio Code to develop, build, and run C# console applications that include console I/O and access the methods of .NET classes
Experience using C# code to evaluate conditional expressions and manage variable scope inside and outside of code blocks
Experience using if-elseif-else and switch-case statements in C# to match a variable or expression against several possible outcomes
Experience using foreach and for statements in C# to loop through a block of code and access elements of array variables
Mô-đun này nằm trong các lộ trình học tập sau
Bài đánh giá mô-đun
Đánh giá sự hiểu biết của bạn về mô-đun này. Đăng nhập và trả lời đúng tất cả các câu hỏi để nhận được chứng nhận "Đạt" trên hồ sơ của bạn.
Làm bài đánh giá mô-đun