random RSS

Follow The Programmer Blog RSS feed to stay up to date with the latest programming tutorials regarding anything random. If you're looking to upgrade your software developer shirt collection we offer some pretty cool programmer shirts. For more of the latest developer news and programming tutorials visit The Programmer Blog. View all programming tutorials tagged with random below:


Java, random

Java - Generating random integers

While generating random int values in a specific range is fairly simple, it still requires that you understand the syntax and how to use the Java Random class. Let's take a quick look at some examples below which go over some options when generating a random number in Java depending on your Java version. Java 1.6 and older In older version of java it...

Read more

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