Take an array of 50 elements: {1, 2, 3, .... 50}
Shuffle the array using any of the standard algorithms of randomly shuffling arrays. The first six elements of the modified array is what you are looking for. HTH
More Related Contents:
- Generating random, unique values C#
- How can I generate random alphanumeric strings?
- Best way to randomize an array with .NET
- Produce a random number in a range using C#
- Why use the C# class System.Random at all instead of System.Security.Cryptography.RandomNumberGenerator?
- Generating a Random Decimal in C#
- Random slot algorithm
- Pros and cons of RNGCryptoServiceProvider
- How to get random values from array in C# [duplicate]
- How to shut down the computer from C#
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- Thread.Sleep for less than 1 millisecond
- Enforce an async method to be called once
- How to flatten nested objects with linq expression
- How to convert Javascript datetime to C# datetime?
- IIS WCF service hosting vs Windows Service
- Hiding unwanted properties in custom controls
- Combine two Images into one new Image
- Remove the title bar in Windows Forms
- XmlSerialize a custom collection with an Attribute
- Multicast delegate of type Func (with return value)?
- How to get a random number from a range, excluding some values
- What does this C# code with an “arrow” (=>, an equal sign and greater than sign) mean and how is it called?
- Redirect stdout+stderr on a C# Windows service
- WinForms DataGridView – databind to an object with a list property (variable number of columns)
- Prevent from displaying of Windows Security window
- The ObjectContext instance has been disposed and can no longer be used for operations that require a connection [duplicate]
- When should one use Environment.Exit to terminate a console application?
- Web Service without adding a reference?
- How to Print Preview when using a DocumentPaginator to print?