Category: C#

How to Sort dictionary by value in C#?

The Dictionary contains the KeyValuePair and the below is a sample code snippet that demonstrates the sorting of the dictionary entries by value in C#. How to Sort dictionary by value in C#?

C# Compiler Error – CS8412 asynchronous foreach requires that the r

In this blog post, you’ll learn more about the C# Compiler Error – CS8412 and the related message description C# Compiler Error Code CS8412 C# Compiler Description for the Code :CS8412 Asynchronous foreach requires that the return type ‘{0}’ of ‘{1}’ must have a suitable public ‘MoveNextAsync’ method and public ‘Current’ property

Json.NET & VB.NET – How to Serialize an Collection?

Do you want to serialize an collection in your VB.NET application?. Json.NET supports this functionality with ease. The Collection can be an Array , Dictionary or List. You need to simply pass collection to the JsonConvert.SerializeObject static method which would serialize the collection and return you the Json string. How to Serialize a Collection in VB.NET using Json.NET ? For example , assume that you…