tubeshowcase●1,194,391 videos♡ My collection 0
← Learn to Code

Learn to Code06:05

C# methods 📞

Bro Code ↗

From the creator

C# methods tutorial example explained Good practice is to capitalize method names (I forgot in this video) #C# #methods #tutorial using System; namespace MyFirstProgram { class Program { static void Main(string[] args) { // method = performs a section of code, whenever it's called "invoked". // benefit = Let's us reuse code w/o writing it multiple times // Good practice is to capitalize method names (I forgot in this video) String name = "Bro"; int age = 21; SingHappyBirthday(name, age); Console.ReadKey(); } static void SingHappyBirthday(String birthdayBoy, int yearsOld) { Console.WriteLine("Happy birthday to you!"); Console.WriteLine("Happy birthday to you!"); Console.WriteLine("Happy birthday dear " + birthdayBoy); Console.WriteLine("You are " + yearsOld + " years old!"); Console.WriteLine("Happy birthday to you!"); Console.WriteLine(); } } }

Published 2021-07-03 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code