Category: C#

C# Compiler Warning – CS1058 a previous catch clause already catches

In this blog post, you’ll learn more about the C# Compiler Warning – CS1058 and the related message description C# Compiler Warning Code CS1058 C# Compiler Description for the Code :CS1058 A previous catch clause already catches all exceptions. All non-exceptions thrown will be wrapped in a System.Runtime.CompilerServices.RuntimeWrappedException.

How to Decode HTML Characters in C# ?

The .NET Framework 4.0 and above provides the WebUtility.HtmlDecode class which lets the developers to convert the string which are encoded with HTML characters to plain string . How to Decode HTML Characters in C# ? Below is a sample code snippet that demonstrates how to decode HTML characters in C#.

C# Compiler Warning – CS8509 the switch expression does not handle al

In this blog post, you’ll learn more about the C# Compiler Warning – CS8509 and the related message description C# Compiler Warning Code CS8509 C# Compiler Description for the Code :CS8509 The switch expression does not handle all possible values of its input type (it is not exhaustive). For example, the pattern ‘{0}’ is not covered.

Json.NET & Oxygene – How to Deserialize an Object ?

One of the ways to Deserialize an object to JSON string in Oxygene in the Json.NET is using the DeSerializeObject method defined in the JsonConvert method. How to Deserialize an Object in Oxygene using Json.NET ? Below is a sample code snippet demonstrating how you can deserialize an object from Json string to Oxygene object using Json.NET. It takes the json string that contains the…