Programming Lessons: Let's learn a little of C# - Lesson 01

in #csharp-forbeginners7 years ago (edited)

Hello Guys


Today I bring a new topic. I wanna teach how to program a little. As you probably know I'm a software developer so I wanna bring some of the stuff that I do daily. With this topic I do not wanna do something hard to understand but the basic concepts of programming.

We'll start with a simple topics and the language that we'll use is C#.

About C#

C# is a simple, modern, general-purpose, object-oriented programming language developed by Microsoft within its .NET initiative led by Anders Hejlsberg. This tutorial covers basic C# programming and various advanced concepts related to C# programming language.

First of all, if you wanna try the examples that I'll provide you can use this site to program online C#. Alternatively, you can install the free version on Visual Studio, the best tool to program C# here.


asd.jpg

Image Source

Lesson 01: Hello World

You can find this example everywhere but it's a classic so I'm using it to teach one of the simple method of C#. The first example is the code to display a message "Hello World" in a console.

Code


// Allow include the System namespace in the program.
using System;

// Namespace declaration. A _namespace_ is a collection of Classes.
namespace HelloWorldApp
{
     // Class declaration
     class HelloWorld
     {
          // Main method, which is the entry point for all C# programs.
          static void Main(string[] args)
          {
               // WriteLine is a method of the Console class defined in the System namespace.
               Console.WriteLine("Hello World");

               // Makes the program wait for a key press
               Console.ReadKey();
          }
     }
}

Console


> Hello World
Press a key to continue...

Hope you enjoy the first lesson :)

@criptomaster
Sort:  

Hello. I've been learning programming for a long time. It;s good that someone started such tutorial.

It's interesting. Here is an upvote for You. Your content is also good, so I will follow You. If You want to have more upovetes, please follow me @szudaj as well and check my posts. I'm pretty sure You will like it!

As the original creator of this tag, I give you approval. Hello World, such a classic... that's why I didn't want to start with that one, lol. Nice little tutorial.

The only thing missing is an explanation of what the lines do and why you used them.

I look forward to reading your other Tutorial Posts to determine whether they get better.

wow, great programming lesson. you can install the free version best tool to program. Thank's for the share.

As someone who has learned the language myself, I know how challenging it can be to get started. If you're looking for extra support with your assignments, there are many online services like https://cwassignments.com/c-sharp-assignment-help.html that offer C# assignment help. These services can be a huge time-saver and allow you to focus on other aspects of your studies. When using these services, be sure to provide clear instructions and any necessary resources to ensure the best possible outcome. Another tip is to review and revise your work thoroughly before submitting it - this will help you avoid mistakes and ensure you receive a good grade.

Coin Marketplace

STEEM 0.13
TRX 0.23
JST 0.031
BTC 83907.96
ETH 1882.01
USDT 1.00
SBD 0.77