Tag Archives: Enumerations

Converting a String into an Enum Variable and Vise Versa

Sometimes you come across situations when you would want to convert an enum variable to a string. For instance, you might want to store it in a database as a string. This is, of course, very easy to do, given … Read More »»»

Posted in C# | Tagged , , , , , , | Leave a comment

How to Deal With “Collection was modified; enumeration operation may not execute.” Error

When performing operations on collections, you may get the following exception: “Collection was modified; enumeration operation may not execute.” You will get this error if you are adding to and removing items from a collection in loops and, surprisingly, when … Read More »»»

Posted in C# | Tagged , , , , , , , | Leave a comment