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.…
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 =…
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…
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…
This snippet let’s you use the Left, Right, Mid methods known from VisualBasic in C# without referencing Microsoft.VisualBasic Namespace.
There are various methods to remove unicode characters from a String in .NET. Below i will show you some methods and the benchmark results. Before choosing a method, take a…