I have a List of chars, and I want to generate a random string from them.
var chars = new List<char>("abcdwhatever".ToCharArray());
var result = chars.OrderBy(new Guid()).Take(5).ToString();
As stated above I want to get random string.
Problem is it returns an error:
The type arguments for method
Enumerable.OrderBy<TSource, TKey>(IEnumerable<TSource>, Func<TSource, TKey>)
cannot be inferred from the usage. Try specifying the type arguments explicitly.
Which is really curious because it's not the first time I'm trying to order a list, but this time, it refuses to work.