I have been trying to make an Anagram solver. Where i read in a sentence, that i split into chars, spaces are allowed aswell. Then store them in a Char array. I have a List words i read in aswell. But am wondering if there is a good way to randommize the order in the char array, it has to consider not putting space at index 0 or index-max. I have read wordlist into a String array like this
String[] gh = File.ReadAllLines("words.txt");
this is just a simple consoleapplication, and it's only meant to be helping me solve the morningpapers anagram.
Edit: what i would like is a good way to swap around the letters of chars in a string?
Edit2: Maybe i should have been more specific, i don't want it to be entirely random. What a way to loop over and rearranging the chars, so i wont get the same word/words twice.