Category Archives: C#

Design Patterns in Sofware Development

By | March 1, 2019

Design patterns are solutions to software design problems you find again and again in real-world application development. Patterns are about reusable designs, creation of objects and interactions of objects. Design Patterns can be broadly categorized in following three categories Creational Design Pattern Factory Method Abstract Factory Builder Prototype Singleton Structural Design Patterns Adapter Bridge Composite… Read More »

Generics at the Run Time in C#

By | August 25, 2018

When a generic type or method is compiled into Microsoft intermediate language (MSIL), it contains metadata that identifies it as having type parameters. How the MSIL for a generic type is used differs based on whether the supplied type parameter is a value type or reference type. When a generic type is first constructed with… Read More »

What is a constraint on generics in C#

By | August 25, 2018

Generics make it possible to design classes and methods that defer the specification of one or more types until the class or method is declared and instantiated by client code. For example, by using a generic type parameter T you can write a single class that other client code can use without incurring the cost… Read More »

What’s new in C# 8?

By | November 27, 2017

1. Non-Nullable & Nullable Reference Types Values types and reference types are the two variables mostly used in C# development. Values types are the likes of int, char, double, enum and struct which cannot take on the value of null (Yes there are nullable values type) whereas reference types (any object such as string) have… Read More »

Category: C#

What is private protected access modifier

By | November 22, 2017

Finally, with C# 7.2 we get a new compound access modifier: private protected indicates that a member may be accessed by derived classes that are declared in the same assembly. While protected internal allows access by derived classes or classes that are in the same assembly, private protected limits access to derived types declared in… Read More »

What is an in parameter in C#

By | November 22, 2017

C# 7.2 adds the in keyword to complement the existing ref and out keywords when you write a method that passes arguments by reference. The in keyword specifies that you are passing the parameter by reference and the called method does not modify the value passed to it. This addition provides a full vocabulary to… Read More »

How to use Azure AD Authentication in web application

By | November 13, 2017

When you want to use Azure Active Directory Authentication in your web application, you have two choices. One when you create your application that time itself you can provide the organization details and Visual Studio will do the rest of the work for you. In background Visual Studio will create application registration for your newly… Read More »

What is a Structure in C#

By | September 11, 2017

Like classes, structs are data structures that can contain data members and function members, but unlike classes, structs are value types and do not require heap allocation. A variable of a struct type directly stores the data of the struct, whereas a variable of a class type stores a reference to a dynamically allocated object.… Read More »

Category: C#