blog RSS

The Programmer Blog is here to help you, the programmer. We do our best to provide useful resources that offer explanations to popular programming problems, across a variety of programming languages. If you would like to suggest a blog topic or have a question, please leave us a message.

c#, list, random

C# - Randomizing a List<T>

Randomizing a list<T> can be done using the Random and a simple LINQ query. Check out our card shuffling example below: Randomizing a list of objects Given a Card class public class Card { public string Name { get; set; } public int Value { get; set; } } Initialize a new list of cards var cards = new List<Card>()...

Read more

c#, c# enum to int, c# int to enum, cast, enum, int, string

C# - Cast int to enum

Casting enums can get tricky in C# so we wanted to provide a few examples to help clarify the situation. Below we are using a simple enum to demonstrate how to cast an int to a enum, enum to an int. We will also go over how to check if an enum exists given an integer or string and how to...

Read more

Welcome - The Programmer | System Out Of Memory

Welcome! While we get setup, please feel free to browse our catalog of shirts. If you have any ideas or feedback, login to your favorite social media platform and give use a shout. Our blog will strive to provide useful insight into the latest and greatest in web development and design. Stay tuned for more.  

Read more