C# classes 📦

Published: 03 July 2021
on channel: Bro Code
79,167
2.5k

C# classes tutorial example explained

#C# #class #classes

using System;

namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
// class = A bundle of related code.
// Can be used as a blueprint to create objects (OOP)

Messages.Hello();
Messages.Waiting();
Messages.Bye();

Console.ReadKey();
}
}
static class Messages
{
public static void Hello()
{
Console.WriteLine("Hello! Welcome to the program");
}
public static void Waiting()
{
Console.WriteLine("I am waiting for something");
}
public static void Bye()
{
Console.WriteLine("Bye! Thanks for visiting");
}
}
}


Watch video C# classes 📦 online without registration, duration hours minute second in high quality. This video was added by user Bro Code 03 July 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 79,167 once and liked it 2.5 thousand people.