C# Abstract class Vs Interface: Difference between Abstract class and Interface in C#

In this article, We are going to discuss the “difference between Abstract class and Interface in C#” with simple examples. This is one of the most frequently asked questions in almost every C# dot net interview.

image result Interface Vs Abstract Class
interface vs abstract class c#

Read more >>

C# Exception: C# Exception handling best practices

An exception is defined as an event that occurs during the program execution that is unexpected by the program code. Exception handling is important because it handles an unwanted exception so that your program code does not crash and remains meaningful to the user.

In this article, we will discuss the exception types and exception handling in C# using try, catch, and finally blocks.

exception handling in C#
C# Exception Handling

Read more >>

C# Enum: How to use enumeration type in C#?

What is an enum in C#?

An enum, or enumeration, is a value type in C# that consists of a set of named constants called the members of the enum. Enums are useful when you have a fixed set of values that a variable can take on, such as the days of the week or a set of predefined options.

Enums are value types, so they are stored in the stack rather than the heap. This means that they are faster to access than reference types, but they also take up more memory.

In this post, we will learn the proper usage of an enum in c# with multiple examples.

C# Enum
C# Enums

Read more >>