How to catch specific MS-SQL SQLExceptions in C# and VB.NET
To catch specific SQLExceptions using Microsoft.NET and Microsoft Sequel Server you can use the snippet below. You also need to look for the specific error numbers/codes you want to catch.…
All the Code Snippets and Samples you need
To catch specific SQLExceptions using Microsoft.NET and Microsoft Sequel Server you can use the snippet below. You also need to look for the specific error numbers/codes you want to catch.…
This is the IsSmallerThan generic extension method, this extension method which is part of the Fesslersoft.Extensions. It should only work with numeric values. Samples Sample C# public static bool IsSmallerThan<TOne,…
This is the IsLargerThan generic extension method, this extension method which is part of the Fesslersoft.Extensions. It should only work with numeric values. Samples Sample C# public static bool IsLargerThan<TOne,…
To convert NSNumber to int using Objective-C you can use the snippet below.
To check if a number is a power of 2 in C# and VB.NET you can use the following extension method. Sample C# Sample VB.NET As always, the extension method…
To round to X decimal places in C# and VB.NET you can use one of the following methods. Take a look at the output image to see the results. Sample…
To generate a random number in C you can use the following snippet. Sample C
To generate a random number in Python you can use the following snippet. Sample Python
To check if number is a prime in Java you can use the following snippet. Sample Java
To make a random number in PHP you can use the following snippet. Sample PHP