Posts

Showing posts from January, 2025

Unable to add controller to ASP.NET, Controller option greyed out / disabled

Image
 If you are unable to add controller to ASP.NET due to controller option being greyed out. Please check out my 1 minute youtube video which provides solution to this issue.  Thank you very much,

How to install Nuget Package in Visual Studio 2022

Image
 I've linked my YouTube video below, where I explain how to install Nuget Package in Visual Studio 2022

How to check .NET (dot net) framework version in Visual Studio Code (VS Code).

Image
I've linked my YouTube video below, where I explain how to check .NET (dot net) framework version in Visual Studio Code (VS Code).

Understanding C# Interface under 10 minutes with example and a coding challenge

Image
 I've linked my YouTube video below, where I explain interface in C# with a practical example and a fun coding challenge at the end. Below the video, you'll find the actual code featured in the tutorial. Try solving the coding challenge yourself before checking out the solution provided at the end of this blog - it’s a fantastic way to test your understanding and sharpen your skills! Happy coding! 😊 Actual code featured in the tutorial using System; using System.Collections.Generic; namespace Interface_App { internal class Program { static void Main(string[] args) { List flyingThings = new List { new People(), new Airplane() }; foreach (var thing in flyingThings) { thing.Fly(); thing.Glide(); Console.WriteLine(); } List speakingThings = new List { new Peopl...

CSharp C# Method Overloading with Practical Example and Coding Challenge / Coding Excercise

Image
I've linked my YouTube video below, where I explain method overloading in C# with a practical example and a fun coding challenge at the end. Below the video, you'll find the actual code featured in the tutorial. Try solving the coding challenge yourself before checking out the solution provided at the end of this blog - it’s a fantastic way to test your understanding and sharpen your skills! Happy coding! 😊 Actual code featured in the tutorial using System; namespace MethodOverLoading { internal class Program { static void Main(string[] args) { Log log = new Log(); log.DisplayLog("Welcome to this program."); log.DisplayLog("You have successfully created the file on ", DateTime.Now); log.DisplayLog("Requires user authentication", 401); } } public class Log { public void DisplayLog(string message) { Console.WriteLine(message...

CSharp C# Method Overriding in with a Practical Example and Coding Challenge

Image
I've linked my YouTube video below, where I explain method overriding in C# with a practical example and a fun coding challenge at the end. Below the video, you'll find the actual code featured in the tutorial. I have used virtual method in the example so i have used abstract class and method for the coding challenge solution. You can solve using both ways. Try solving the coding challenge yourself before checking out the solution provided at the end of this blog - it’s a fantastic way to test your understanding and sharpen your skills! Happy coding! 😊 Actual code featured in the youtube tutorial above using System; namespace Method_Overriding { internal class Program { static void Main(string[] args) { Engineer engineer = new Engineer(); engineer.Work(); FrontEndEngineer frontEnd = new FrontEndEngineer(); frontEnd.Work(); BackEndEngineer backEnd = new BackEndEngineer(); b...

Understanding Classes in C#

Image
Introduction In C# class is a blueprint for creating objects. It contains data (properties) and behaviour (methods). We can build multiple objects with distinct properties and methods using classes without having to repeat the code. Class Syntax: Creating a generic C# Class public class Car //car is the class name and Pascal case { public string Model { get; set; } //properties public string Color { get; set; } public void Start() //method { Console.WriteLine("Car started."); } public void Stop() //method { Console.WriteLine("Car stopped."); } } A generic class in C# is created using a class keyword followed by class name. Class name, property name, method name must always be Pascal case i.e. Starting letter must be capital case. Class can have different properties and methods. We cannot use the class directly without creating an object. In order to use class we must create an object which is an inst...