Вопрос по c#, random – Метод RandomNumber возвращает одно и то же число каждый раз, когда вызывается

6

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

    private int RandomNumber(int min, int max)
    {
        Random random = new Random();
        return random.Next(min, max);
    }

Error: User Rate Limit Exceeded

        for (int i = 0; i < charsRaw.Length; i++)
        {
            int max = charsRaw.Length - 1;
            int rand = 0;
            rand = RandomNumber(0, max);

            charsNew[i] = charsRaw[rand];
            text2 += charsNew[i];

         }

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded

Ваш Ответ

2   ответа
17

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded:

The random number generation starts from a seed value. If the same seed is used repeatedly, the same series of numbers is generated

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded
Error: User Rate Limit Exceeded Eric
Error: User Rate Limit Exceededportal.acm.org/citation.cfm?doid=1276927.1276928)
Error: User Rate Limit Exceeded
1

Error: User Rate Limit Exceededducks for cover

Похожие вопросы