Tagged: c#

Asynchronous JSON Downloader and Serializer class for C#

When deploying apps utilising data from third-party APIs you will often find yourself dealing with downloading and parsing data in JSON. In .NET, a popular choice for manipulating JSON data is Json.NET, which comes with all the facilities needed for dealing with JSON data right out of the box. With the introduction of the async and await asynchronous modifiers in...


C# string palindrome check

Cool observation Morpheus, but what exactly is a palindrome? For people unfamiliar with this term, a quick google search defines it as: a word, phrase, or sequence that reads the same backwards as forwards, e.g. “madam” or “nurses run”. The definition is pretty self explanatory. Now, let’s think of an algorithm to check if a given string is a palindrome...


VB.NET ControlChars class for C#

Do you miss the so-useful ControlChars class of VB.NET in Visual C#? I know I do. Can we use it without having to import the Microsoft.VisualBasic namespace in our project? No problem, we’ll create a class ourselves to mimic it’s functionality. Instructions Right click your project’s solution Select “Add” followed by “New Item…” Click on “Class”, name your class ControlChars.cs...