I am trying to implement a random 1 character alphanumeric JArray.
I came across this :
How can I generate random alphanumeric strings in C#?
However, I need a JArray so I tried this instead :
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var random = new Random();
var result = new JArray(
Enumerable.Repeat(chars, 1)
.Select(s => s[random.Next(s.Length)])
.ToArray());
I get a Could not determine JSON object type for type System.Char
error every time.
Any ideas?