Yes I have searched a lot for a solution and yes I am a beginner and this is the first time that I asked a question through this website. I usually ask it to my teacher but I have a holiday and I am spending my free time on learning C#.
I have a task which I made up by myself and the task is a game where you have to put a word into a console application and the console has to randomize every single letter of the word so that the other player has to guess what the word is.
example : the word is "programming" and after that the console will mix up the letters of the word, so it could be "ginamrmgorp" and the player has to guess what the word is.
string woord = Console.ReadLine();
Random random = new Random();
char[] woorden = woord.ToCharArray();
for (int i = 0; i < woorden.Length; i++)
{
kiesgetal = random.Next(0, woorden.Length);
char letter = woorden[kiesgetal];
Console.Write("letter: ");
Console.WriteLine(letter);
}
Console.ReadKey();
The problem is that the console isn't using every letter of the word but the console is using some letters (not all) of the word and it puts it in the length of the word so it isn't "ginamrmgorp" but "gimmmmoopra".