Horje
c# randomize a list Code Example
c# randomize a list
var shuffledcards = cards.OrderBy(a => Guid.NewGuid()).ToList();
c# shuffle
private static Random rng = new Random();  

public static void Shuffle<T>(this IList<T> list)  
{  
    int n = list.Count;  
    while (n > 1) {  
        n--;  
        int k = rng.Next(n + 1);  
        T value = list[k];  
        list[k] = list[n];  
        list[n] = value;  
    }  
}




Csharp

Related
get dropdown selected value unity Code Example get dropdown selected value unity Code Example
how to make a button open window in wpf Code Example how to make a button open window in wpf Code Example
json stringify c# Code Example json stringify c# Code Example
Newtonsoft.Json.JsonSerializationException: 'Self referencing loop detected for property Code Example Newtonsoft.Json.JsonSerializationException: 'Self referencing loop detected for property Code Example
photon how to destroy object Code Example photon how to destroy object Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9