Horje
c# randize list Code Example
c# randomize a list
var shuffledcards = cards.OrderBy(a => Guid.NewGuid()).ToList();
c# randize list
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
or in if statement c# Code Example or in if statement c# Code Example
c# compress string Code Example c# compress string Code Example
.net get system environment variable Code Example .net get system environment variable Code Example
calculate distance using latitude and longitude c# Code Example calculate distance using latitude and longitude c# Code Example
c# get list item in random order Code Example c# get list item in random order Code Example

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