Part 1 - C# Tutorial - Introduction.avi

kudvenkat · 4.2M views · 2012 · 13:10

Open on YouTube

Software practice, open source & careersEducation & learningtutorial

Why Stack Overflow recommends it

Stack Overflow users link it when a beginner asks basic C# questions, such as where Console.WriteLine comes from or how namespaces and the Main method work, and needs a starter tutorial.

Recommended by 3 people across 3 different months, 2012 to 2018.

What it is

The first video in kudvenkat's long-running C# beginner series, a 13-minute screen recording that walks through a Hello World program. It explains the basic structure of a C# program, what a namespace is, and the role of the Main method as the entry point.

What people said

Strong rec Josh Campbell · 2012-07 · Stack Overflow · on “I am a beginner in C# and need help creating a proper method”

I agree with zeencat 100%. The only way to trully learn something is by self discovery. Doing this will allow you too pick up many additional unknown pieces and best practices along the way. Your code does not look 'that bad' given that you mentioned you're a beginner, however I do notice a few things you should take notice of in your class: To name one example: your class attributes (public string companyName;) should never be public, as this allows the end user to purposely or unintentionally break the code. These fields should always be private. Additionally, it's usually good practice to use Hungarian Notation when creating class attributes and including an underscore to denote the field

Recommends Djordje · 2017-09 · Stack Overflow · on “C# where does Console.WriteLine came from”

I agree with rqnn and i think you need some time and a lot of tutorials to ask this kind of question and process the answer becouse it is a large topic. Recommendations to this [this video] tutorials about c# as well as .Net program execution. Maybe this illustration about namespace will help you process rqnn's answer. using System; using MySystem; namespace ConsoleApp1 { class Program { public static void Main(string [] args) { Console.WriteLine("Hello world"); MyConsole.MyWriteLine("Hello world"); //other way (then you wouldn't need using System and using MySystem) System.Console.WriteLine("Hello world01"); MySystem.MyConsole.MyWriteLine("Hello world01"); } } } // I've created my own namespace

Recommends SE1986 · 2018-08 · Stack Overflow · on “Unity C# Class and Objects”

The this keyword means "A reference to the current instance of the class" It's syntactic sugar really (it can make your code clearer to read) When you do public static void Using() { Attack(); this.Attack(); } Behind the scenes, the compiler will execute it as so: public static void Using() { this.Attack(); this.Attack(); } so in your context, they are the same. There are times it is useful see this post [LINK] If I understand correctly, this question relates to why do you need to have a variable called name rather than just naming the object as the player name. The variable "name" and the name of the object are two different things Lets say you want to output the players name to the screen