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.…
MD5 Hash creator
We have just released another tool in our new Tools section. It’s a online MD5 Hash Creator, which uses HTML, AngularJs and Bootstrap. MD5 Hash Creator If you have any…
How to extract a password protected zip file using DotNetZip in C# and VB.NET
To extract (unzip) a password protected zip file using the Ionic DotNetZip Library, you can use the snippet below. Samples [tab name=”C# Sample”] string zipFile = @"C:\Users\Fesslersoft\Desktop\ZipTest\Test.zip"; string targetDirectory =…
Base64 encoder and decoder
We have just released the first tool in our new Tools section. It’s a unicode compatible base64 encoder/decoder, which uses HTML, AngularJs and Bootstrap. Base64 Encoder/Decoder If you have any…
How to use a specific encoding using XDocument in C# and VB.NET
To use a specific encoding when working with XDocument, you can create an XDeclaration. Samples C# Sample XDocument xDoc = new XDocument(); xDoc.Declaration = new XDeclaration("1.0", "ISO-8859-1", ""); VB.NET Sample…
How to remove specific (unicode) characters in a String using C# and VB.NET
Here is an example on how to remove specific (unicode) characters in a String using C# and VB.NET Samples C# Sample static void Main(string[] args) { Console.OutputEncoding = System.Text.Encoding.Unicode; const…
Top 10 reads of July 2015
These are our Top 10 reads of July 2015. How to match strings using wildcards in C# and VB.NET IsSmallerThan generic extension method for C# and VB.NET How to prevent…
Top 10 reads of June 2015
These are the Top 10 reads of June 2015. How to convert Color to Hex and Hex to Color using C# and VB.NET How to Remove duplicates from a IEnumerable…
IsSmallerThan generic extension method for C# and VB.NET
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,…
IsLargerThan generic extension method for C# and VB.NET
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,…