Tutorials


How to check if a string is a number in C#

Steps to check if a string is a number in c# 1.Declare an integer variable. 2.Pass string to int.TryParse() or double.TryParse() methods with out variable. 3.If the string is a number TryParse method will return true. And assigns value to the declared integer value.

How to loop or get enum names and values in C#

Steps to loop or get enum names & values in C# 1.Use C# Enum.GetValues() method to get all possible values of Enum.2.Then, enumerate or loop the enum values using foreach or for loop.

How to convert byte array to a hexadecimal string in C#, and vice versa?

This post contains two simple methods to convert byte array to hexadecimal string in C# and vice versa.

Get int value from Enum in C# with examples

To get int value from enum in C#, cast the enum to int

List all containers in Docker command

We can get a list of all containers in docker using docker container list or docker ps commands.

Copying files/folders from host to Docker container & docker container to host

To copy files or folders from host to docker container or docker container to host use docker cp command

How to convert string to enum in C#

To Convert string to enum in C# use Enum.TryParse and Enum.Parse methods

How To Check If A String Is Empty/Null/Undefined In JavaScript

To check if a string is null or empty or undefined use the following code snippet if(!emptyString){ // String is empty }

How To Create UUID/GUID In JavaScript With Examples

To create GUID or UUID in JavaScript we can use Math.Random() or ES6 crypto API getRandomValues method.GUID or UUID generated by Math.Random() may not be unique.

8 ways To Check If An Object Is Empty or not In JavaScript

In javascript, we can check if an object is empty or not by using JSON.stringify, Object.keys (ECMA 5+),Object.entries (ECMA 7+)