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 TH-camrs instead of the other useless entertainment.
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
what if i wanted to user input to be an int and they place an empty int?
Thanks for the video brother.
Ваши уроки более яснее чем рассказывают об этом русские🤦🏻
Спасибо большое 🙏
What a wonderful content
Awesome video!
ty sir as always
do while loops restart if the condition is true again?
Random rnd = new Random();
int num = rnd.Next();
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.
thanks
Chad channel.
lesson check😇
volim te
Thanks!
noice
Thenk you
3 years later, still saving my exams
random comment 😃
random reply
random comment
Conde de sabugosa.
Console.Write("Thank you");
while ksksksksks