What is the difference between continue and break statements in C#?
What is the difference between continue and break statements in C#?
Here is the difference between the continue and break statements in C#:
for (int i = 1; i <= 10; i++)
{
if (i % 2 == 0)
{
continue; // Skips even numbers
}
Console.WriteLine(i); // Prints only odd numbers
}
entry
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào