C# – How to ping an IP/Address with .NET Core

By | 28/09/2022

In this post, we will see how to ping an IP or Address with .net Core. We start creating a Console application called CheckIP where, we will define a class called CheckService so defined: [CHECKSERVICE.CS] Finally, we modify Program.cs in order to use the class CheckService: [PROGRAM.CS] We have done and now, if we run… Read More »

Category: C#

C# – 10

By | 31/08/2022

In this post, we will see three interesting features introduced with C# 10.For the complete list of all new features go to Microsoft web site.It is important to remember that for using C# 10 we need to install in our system .net 6. We start opening VS 2022, we create a new Console Application project called… Read More »

Category: C#

C# – Bogus

By | 03/08/2022

In this post, we will see how to use the library Bogus.net.But first of all, what is Bogus?Bogus is a library for generating fake data and it is based on the Faker.js. Here, we can find all information and the source code. We start creating a Console application called TestBogus where, we will install Bogus… Read More »

Category: C#

Asynchronous Programming – WhenAll vs WaitAll

By | 27/07/2022

In this post, we will see the differences between WhenAll and WaitAll in the Asynchronous Programming. We start creating a Console Application called TestAysncAwait where, we will add two classes called ClassWaitAllTest and ClassWhenAllTest: [CLASSWAITALLTEST.COM] [CLASSWHENALLTEST.COM] Then, we modify the Program.cs file in order to run and testing ClassWaitAllTest: [PROGRAMM.CS] We have done and now,… Read More »

Asynchronous Programming – Task and Cancellation Token

By | 20/07/2022

In this post, we will see how to use a Cancellation Token in a Task.But first of all, what is a Cancellation Token?From Microsoft web site:“A CancellationToken enables cooperative cancellation between threads, thread pool work items, or Task objects“.In a nutshell, when we run a Task and we decide to cancel it, using a cancellation token we will stop… Read More »