Learn How To Program In C# Part 6 – While Loop

8
5



Become full stack developer at

Follow me on Instagram:

This C# tutorial is about while loop. These C# tutorial series will make you into a better developer whether you are a beginner or a seasoned programmer. Even though this is a C# tutorial for beginners you can still relearn the basics and get a more structured understanding of C# programming language. If you are a beginner C# developer than this is a wonderful opportunity to start learning C# programming language from the ground up.

In these C# tutorials you will first learn the theory and technical definitions behind the concept and then actually see an example of how it is used. The unique part of these C# tutorials is that each of them not only explains you the concepts but also explains you their purpose and why they exist in the first place. This in turn will give you a much broader understanding when you are working on your own projects or even products!

One of the other things to expect from these C# tutorial series is that they will connect these simple concepts to the real life – meaning in each video you will learn about the best practices, dos and donts. Instead of just learning the theory you will also learn the practical application.

I hope that this C# tutorial teaches you about while loop and that you are able to use C# in order to work on your own ideas. Thank you for watching and being part of my journey!

Thank you for watching and learning about while loop, wish you all the best. Never stop improving!

#CSharp #Programmer #Coder #SoftwareDeveloper #SoftwareEngineering #Coding #ComputerProgramming #AvetisG #ProgrammingTutorial #SoftwareDevelopment #DotNet #CSharpCoder #Developer #CSharpDeveloper #CSharpProgrammer

Nguồn:https://wijstaanvooronzegrondrechten.org/

8 COMMENTS

  1. I have done exactly what you did but no numbers show up in the terminal. All that is happening is the terminal is opened up and then it says to press any key to continue then it says process complete. I am using mac. Terminal is mac version of console.
    My code looks like this:

    using System;

    namespace WhileTest
    {
    class Program
    {
    static void Main(string[] args)
    {
    int index = 0;

    while (index > 10)
    {
    Console.WriteLine("The number is {0}", index);
    index = index + 1;
    }
    }
    }
    }

  2. What does the word "index" stand for and were does it come from? Also can the "index" equal to something other than "0"? And when you do "index = index + 1" can it be another number instead of "1" i guessing it can right? Thanks

  3. Been having lots of fun with your tutorials so far, and I think im gonna grab your course from Udemy. I just have one question, though. What does {0} do? I mean I kind of understand it, is it like a placeholder of some sort? Would appreciate a brief explanation. Thank you so much, again your tutorials are the best!

  4. I'm completely new to learning code and I've been finding these videos really helpful! I wasn't sure how you were "Step" ing through your code until after I'd completed this exercise, and I wanted to see an output line for line in the console. I was rearranging the order of some conditional blocks to see how the output / flow would change.

    I'm trying to push myself a little bit after each exercise. I'm so new I don't trust myself to know exactly what my code is doing so I thought I'd try to make the output show it a little better, and to use some stuff I've learned from your videos thus far. I've learned more about coding in one night via your videos than any other attempts combined.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    namespace LoopingWhile
    {
    class Program
    {
    static void Main(string[] args)
    {
    int index = 0;

    while (index < 10)
    {
    Console.WriteLine("The number is {0}", index);
    index = index + 1;

    Console.WriteLine("Program Running.");
    }

    if (index.Equals(10))
    {
    Console.WriteLine("The final number is {0}", index);
    }

    switch (index)
    {
    case 10:
    Console.WriteLine("Program End.");
    Console.WriteLine("");
    break;
    }
    }
    }
    }

LEAVE A REPLY

Please enter your comment!
Please enter your name here