Skip to content

PRO TIP Block youtube.com at the DNS level — Pi-hole, NextDNS or your hosts file — but allow youtube-nocookie.com and i.ytimg.com. These tutorials keep playing; the rabbit hole does not.

Learning without distractions

C# constants π

68.1K views on YouTube

C# constants const tutorial example explained

#C# #constants #const

using System;

namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
// constants = immutable values which are known at compile time
// and do not change for the life of the program

const double pi = 3.14;

//pi = 420; //can’t change this constant

Console.WriteLine(pi);

Console.ReadKey();
}
}
}