Category Archives: C#

C# – Events

By | 10/03/2021

In this post, we will see what an Event is and how we can use it.First of all, what is an Event?From Microsoft web site:“An event is a message sent by an object to signal the occurrence of an action. The action can be caused by user interaction, such as a button click, or it… Read More: C# – Events »

Category: C# Tags:

C# – Dynamic Type

By | 24/02/2021

In this post, we will see what a Dynamic Type is and how to use it. Dynamic Type was introduced in C# 4.0 and it avoids compile-time type checking.It escapes type checking at compile-time and it resolves type a run time.A dynamic type variable is defined using the dynamic keyword.Let see some examples: DEFINING A… Read More: C# – Dynamic Type »

Category: C# Tags:

C# – Delegates

By | 10/02/2021

In this post, we will see what Delegates are and how to use them.First of all, what is a Delegate?From Microsoft web site: “A delegate is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a… Read More: C# – Delegates »

Category: C# Tags:

C# – TDD

By | 06/01/2021

In this post, we will see how to create a simple Console application (a calculator), using TDD.But first of all, what is TDD?From Wikipedia:“Test-driven development (TDD) is a software development process that relies on the repetition of a very short development cycle: requirements are turned into very specific test cases, then the code is improved… Read More: C# – TDD »

C# – SOLID Principles

By | 29/04/2020

In this post, we will see what SOLID means and how to implement it using C#. SOLID is a mnemonic acronym for five designers principles that help us to write software more understandable, easier to maintain, flexible and easier to extend.The five principles are:Single responsibility principleOpen/closed principleLiskov substitution principleInterface segregation principleDependency inversion principle  SINGLE RESPONSABILITY… Read More: C# – SOLID Principles »

C# – How to add and read an appsetting.json file in a Console Application

By | 19/02/2020

In this post, we will see how to add and read an appsettings.json file in a .NET Core Console Application.We open Visual Studio and we create a Console Application (.NET Core) project called “TestJson“: Now, we add a file called “Parameters.json”, where we will storage a connection string for a DB and two parameters called… Read More: C# – How to add and read an appsetting.json file… »

Category: C# Tags:

C# – Dapper

By | 06/12/2019

From Dapper Official Web Site:“Dapper is a simple object mapper for .NET and owns the title of King of Micro ORM in terms of speed and is virtually as fast as using a raw ADO.NET data reader. An ORM is an Object Relational Mapper, which is responsible for mapping between database and programming language.Dapper extends… Read More: C# – Dapper »

Category: C# Tags: