Sunday, October 12, 2014

WeightedRandom - Select content based on weights (C# / .NET)

Need to select content from a collection based on weights?  Here is a great .NET 4+ class that is very helpful.

The class can be used with just about any collection and you can pass in a delegate/lamda to determine what the weight is on each collection object.

No comments:

Can't RDP? How to enable / disable virtual machine firewall for Azure VM

Oh no!  I accidentally blocked the RDP port on an Azure virtual machine which resulted in not being able to log into the VM anymore.  I did ...