Tag Archives: C#

C# – Yield

By | 15/09/2021

In this post, we will see how to use the Yield keyword in a C# application.But first of all, what is Yield?From Microsoft web site:“When you use the yield contextual keyword in a statement, you indicate that the method, operator, or get accessor in which it appears is an iterator. Using yield to define an… Read More »

Category: C# Tags:

C# – Unit test with Moq

By | 04/08/2021

In this post, we will see how to use Moq in order to create Unit Test for a Class Library project used to manage CRUD operations.But, what is Moq?Moq is a library used to create mock objects that simulate or mimic a real object.Here, we can find the Moq project. First of all, we define… Read More »

Azure – Cosmos DB

By | 07/07/2021

In this post, we will see how to create a database in Cosmos DB using Azure Portal and how to manage CRUD operations with a console application.But, what is Cosmos DB?From Microsoft web site:“Azure Cosmos DB is a fully managed NoSQL database for modern app development. Single-digit millisecond response times, and automatic and instant scalability,… Read More »

C# – 9.0

By | 16/06/2021

In this post, we will see two interesting features introduced with C# 9.0.For the complete list of all new features, we can go to Microsoft web site. RECORDSRecords provide an extremely fast way to define an immutable object with value type semantics. If we run the application, this will be the result: A Record is… Read More »

Category: C# Tags:

C# – Asynchronous Programming

By | 26/05/2021

In this post, we will see how to manage Asynchronous Programming in C#.Asynchronous programming is a means of parallel programming in which a unit of work runs separately from the main application thread and notifies the calling thread of its completion, failure or progress.Obviously, there would be many things to see and understand in Asynchronous… Read More »

Category: C# Tags:

Design Patterns – Command

By | 31/03/2021

From https://en.wikipedia.org/wiki/Command_pattern:“In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or trigger an event at a later time. This information includes the method name, the object that owns the method and values for the method parameters.”In a nutshell, we can use the Command Pattern to encapsulate… Read More »