C#

How to extract number from string using Linq

Imagine you have an s tring("ABCDE99F-J74-12-89A") , and you want to extract the only number from the string. This snippet will show how to extract numbers from strings. using System ; using System . Collections . G…

C# Boyer-Moore String Search Example

In this article, I will show you the implementation of the ==Boyer-Moore == algorithm. Boyer Moore is a string searching algorithm. It avoids checking most positions in the source string. The implementation here uses constant ch…

Delete node from linked list with specific value

In computer science, a linked list is a linear collection of data elements whose order is not given by their physical placement in memory. Instead, each element points to the next. It is a data structure consisting of a collecti…

Encrypt and Decrypt a String in C# Using Asymmetric Encryption

There are two classes for asymmetric encryption in .net. RSACryptoServiceProvider and DSACryptoserviceProvider . Both classes automatically create the public and private keys necessary to encryption and decryption with the defau…

C# Program To Print All the IP Addresses of the Given Website

In this code snippet, I will show you how to print all the IPV4 addresses of any website using C#. For this, you have to call the static method GetHostAddressesAsync on Dns class. It will return an Array of IPAddress . Check o…

Disposal and garbage collection in C#

Object lifetime in C# What new keyword does? Allocate Objects onto one of two heaps How Garbage collection works? The System.GC type How to avoid Memory Leak? Building Disposable Object Finalizer (+ Freachable) Queue …

Best Practice for Using HttpClient-C#

Best Practice for Using HttpClient-C# Almost every application nowadays is making HttpRequest get data from other services. In this article, I will share some best practices for using the .net core HttpClient API. To understan…

تحميل المزيد من المشاركات
لم يتم العثور على أي نتائج