using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // while loop = repeats some code while some condition remains true String name = ""; while (name == "") { Console.Write("Enter your name: "); name = Console.ReadLine(); } Console.WriteLine("Hello " + name); Console.ReadKey(); } } }
using System;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
// while loop = repeats some code while some condition remains true
String name = "";
while (name == "")
{
Console.Write("Enter your name: ");
name = Console.ReadLine();
}
Console.WriteLine("Hello " + name);
Console.ReadKey();
}
}
}
thanks for the code bro, it is very helpful
Thank for lesson it was very usefull
HELP! I'M STUCK IN AN INFINITE LOOP!!!
press ALT-f4
bet u can't
noo!
ctl + c
Ваши уроки более яснее чем рассказывают об этом русские🤦🏻
Спасибо большое 🙏
Not going to lie, content like these should be often used by RUclipsrs instead of the other useless entertainment.
Thanks for the video brother.
ok, this is my lesson #15. thank you broooo. i am excited to post the comment under last published video for c# and then move on to next language
Awesome video!
what if i wanted to user input to be an int and they place an empty int?
ty sir as always
thanks
Chad channel.
volim te
Thanks!
Thenk you
noice
Random rnd = new Random();
int num = rnd.Next();
do while loops restart if the condition is true again?
lesson check😇
My program start from Module Module1 then sub main () and end sub ()
Why mine and your syntax is different
Because Visual Studio updates code to require less.
random comment 😃
random reply
3 years later, still saving my exams
random comment
Console.Write("Thank you");
Conde de sabugosa.
while ksksksksks