Skip to content

Instantly share code, notes, and snippets.

@Chizaruu
Last active December 14, 2022 06:22
Show Gist options
  • Select an option

  • Save Chizaruu/7e56212f1457ca104cbeb6e59229a016 to your computer and use it in GitHub Desktop.

Select an option

Save Chizaruu/7e56212f1457ca104cbeb6e59229a016 to your computer and use it in GitHub Desktop.
Snippet for Part 1 of my C# Tutorial
using System;
namespace MyProject
{
class Program
{
static void Main(string[] args)
{
// Declare and initialise variables here
}
}
}
using System;
namespace MyProject
{
class Program
{
static void Main(string[] args)
{
// Declare and initialise variables here
int age = 25;
double pi = 3.14;
string greeting = "G’day";
bool isMarried = false;
float height = 1.931f;
// Print out the variables here
Console.WriteLine(age);
Console.WriteLine(pi);
Console.WriteLine(greeting);
Console.WriteLine(isMarried);
Console.WriteLine(height);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment