Part 2: Calculations with Roman Numerals using C#
In a previous article I wrote how to parse Roman Numerals in C#. This article will focus on how to calculate with the class in an intuitive way. It will show how to implement implicit casting and the add and subtraction operator overloads. Fun stuff that’s probably useful in other projects.
Part 1: Parsing Roman Numerals using C#
Lately I’ve become fascinated with the Latin language. I’m working on a project that converts photographs of Latin inscriptions on medieval statues into translated text. One of the challenges is parsing years, usually expressed in the form of Roman Numerals.
After building a parser class I noticed that it had a lot of nice characteristics: parsing, operator overloading, implicit conversions. A nice way to play around with C#.
Simple Database-less Authentication for MVC.Net
There are many projects that are way too small to setup an ASP.Net membership configuration or OWIN authentication. But you still want to protect your applications by one or more accounts. What to do?
Well… there is a small – but obsolete (!!) – thing that you can try: ASP.Net Forms Authentication. While it is obsolete, it is still usable. In this article I’ll show how to implement it for MVC.Net.
Rasterizing EMF files with .Net / C#
I can almost hear you think: “Why on earth would anyone use EMF?” Well… I don’t… but MS Office does! Thumbnails that are saved in MS Word documents are in the EMF format. As I struggled to do something with one, I realized that I had to convert it first to a more “easy to handle” format: PNG. Easier said than done.
A BlockHasher helper class
There are a few instances in which you’ll need to hash a combination of data. You might resort to creating one big string and hashing that. It has a clear disadvantage from a memory and processing point of few. It might even be impractical when files or streams are involved. That’s why I created a BlockHasher utility class that helps to generate these types of hashes.