Untitled

mail@pastecode.io avatar
unknown
csharp
2 years ago
886 B
3
Indexable
Never
string[] AS;
              int count;
              string[] AS2;
              count = 0;
              AS = new string[count];
               string str;
               char[] delimiterChars = {'\n'};
               string[] words = s.Split(delimiterChars);
foreach (var word in words){
    string data650 = word;
     str =  data650;
          if (str!="")
             {
                   count++;
              AS2 = new string[count];
              for (int i = 0; i < AS2.Length - 1; i++)
                     AS2[i] = AS[i];
         AS2[count - 1] = str;
         AS = AS2;
     }
}
string str2 = "";


Random rng = new Random();
for (int i = AS.Length - 1; i >= 1; i--)
{
   int j    = rng.Next(i + 1);
   var temp = AS[j];
   AS[j] = AS[i];
   AS[i] = temp;
}



for (int i = AS.Length; i > 0; i--)

   str2 += AS[i];

    return str2;