C# Struct vs Class |Top 15 Most Astounding Differences Between C# Struct and Class

C# struct vs class
C# struct vs class

C# Struct vs Class – In C#, Struct and Class are user-defined data types that can contain a variety of data types. The main difference between these two is that class is the reference type, whereas Struct is a value type.

C# Struct vs Class-The Most Important Differences

Continue reading “C# Struct vs Class |Top 15 Most Astounding Differences Between C# Struct and Class”

C# List Class |Top 12 Amazing Generic List Methods

C# List
List in C# – Methods and Properties

In C#, the List<T> class is a generic type used to represent the collection of strongly typed objects that can be accessed via index or loops. The List<T> class is available in the System.Collection.Generic namespace.
It allows you to search, sort, manipulate, add, and remove elements from the collection of strongly typed objects.
In C#, Arrays, Queues, Linked lists, and other single-dimensional data structures have been replaced by the generic list. Because it has so many additional characteristics, such as the ability to dynamically expand in size when an item is added.

The above diagram illustrates the methods and properties of the List class.

C# List<T> (List) Characteristics

Continue reading “C# List Class |Top 12 Amazing Generic List Methods”

The 6 Access Modifiers in C# – Everything you need to know

In this post, we’ll go through the different types of access modifiers and how to utilize them in C#.

Access Modifiers in C#
Access Modifiers in C#

In C#, access modifiers are keywords that describe how a class, its properties, fields, or methods are accessible in a program. These access modifiers are mainly used to specify the type’s and its members’ scopes, as well as to safeguard data from being accidentally changed by external classes or programs.

What are the types of access modifiers in C#?

Continue reading “The 6 Access Modifiers in C# – Everything you need to know”

C# Dictionary with Examples-(System.Collections.Generic)

C# Dictionary
C# Dictionary

In C#,  Dictionary  is a generic collection, generally used to store a collection of key/value data pairs organized by unique keys. The operation of Dictionary is very similar to that of the non-generic hashtable. The  System.Collection.Generic  namespace defines a dictionary in C#. It is dynamic in nature, which means that the size of the dictionary changes dynamically, allowing you to add or remove objects from the dictionary as needed.
Only strongly typed objects, key/value pairs of a given data type can be stored in a dictionary in C#.

C# Dictionary Characteristics

Continue reading “C# Dictionary with Examples-(System.Collections.Generic)”

IEnumerable Interface in C# |12 key points you should know about IEnumerable

In this article, we will discuss how to implement the IEnumerable interface in C# through several examples and code implementations.

What is an IEnumerable interface in C#?

In C#, the IEnumerable interface is considered as the base interface for all the non-generic collections that can be enumerated by using the foreach statement. IEnumerable in C # is available in the System.Collections namespace. It contains a method called GetEnumerator, which returns the IEnumerator interface.
The IEnumerator interface provides the ability to loop through the collection by exposing the Current property and the MoveNext () and Reset () methods.

Syntax Of IEnumerable Interface C#

The IEnumerable has the following syntax:

Continue reading “IEnumerable Interface in C# |12 key points you should know about IEnumerable”

Views In SQL | Types Of Views In SQL Server [2021]

In this article, We’ll go over the different types of views in SQL Server through examples. In addition, we will learn how to create, alter, update, and delete views in SQL Server.

View in SQL Server
Views in SQL Server

What is a view in SQL?

Views in SQL Server are nothing more than virtual tables based on the result sets of SQL statements from one or more tables.

Continue reading “Views In SQL | Types Of Views In SQL Server [2021]”

C# Abstract class Vs Interface | 10 differences between Abstract class and Interface with examples

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 common questions asked in almost every C# dot net interview.

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

C# Abstract class Vs Interface

Continue reading “C# Abstract class Vs Interface | 10 differences between Abstract class and Interface with examples”

C# Exception Handling With Examples

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

Exception Handling in C# is a process to handle runtime errors. The.NET framework provides a number of built-in classes for dealing with common exceptions that can result in program termination.

exception handling in C#
C# Exception Handling

What is an Exception in C#?

An exception is a runtime error that interrupts the normal flow of a program. In other words, an exception is an abnormal condition that causes a running program to terminate. If the exception is not handled, the application may crash.

Exception Classes in C#

There are many exception classes available in C#, such as:

Continue reading “C# Exception Handling With Examples”