C# Programming
Printing Text
Variable Names

User Input
Comments
Conditional Statements
Switch Statements
Last updated

Last updated
using System;
namespace HelloWorld
{
class Program
{
static void Main()
{
Console.WriteLine("My Name is Fabian");
Console.ReadLine();
}
}
}
using System;
using System.Collections;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Giraffe
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("What is your name?");
string name = Console.ReadLine();
Console.WriteLine($"Your name is {name}");
Console.ReadLine();
}
}
}/* This is a comment */using System;
namespace IfElseStatement
{
class Program
{
static void Main(string[] args)
{
int people = 12;
string weather = "bad";
if (people <= 10 && weather == "nice")
{
Console.WriteLine("SaladMart");
}
else
{
Console.WriteLine("Soup N Sandwich");
}
}
}
}string color;
switch (color)
{
case "blue":
// execute if the value of color is "blue"
Console.WriteLine("color is blue");
break;
case "red":
// execute if the value of color is "red"
Console.WriteLine("color is red");
break;
case "green":
// execute if the value of color is "green"
Console.WriteLine("color is green");
break;
default:
// execute if none of the above conditions are met
break;
}