0

can we write console.weiteline after the do while loop?Explain

9th Jul 2016, 11:11 AM
Ankit
Ankit - avatar
5 Answers
+ 1
int x = 5; do { x++; }while(x < 10); Console.WriteLine("The value of x is {0}, x); // You can add almost anything after anything. Asqell as inside.
9th Jul 2016, 1:12 PM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
+ 1
Let's put it this way... you can put anything after any statement and unless anything preceding one line doesn't already return a value or explicitly tells the function to stop, your code will continue to execute until it reaches the last line in a method.
30th Jul 2016, 8:30 PM
Mike
Mike - avatar
0
YES YOU MAY. You may add any number of CWL after your do-while loop 😁
9th Jul 2016, 1:45 PM
Erwin Mesias
Erwin Mesias - avatar
0
you can use as per your requirement in the application
10th Jul 2016, 5:22 PM
shiva
0
Yes. You can keep writing code after the loop. But you cant use Console .weiteline Syntax error! 😉😉😊
16th Aug 2016, 3:31 PM
Taj K.