@명관 송 , based on my test, I reproduced your problem.
According to the Microsoft doc ref said, An argument that is passed to a ref or in parameter must be initialized before it is passed.
Therfore, we could use the following code to initialize the argument.
public static void GetSuffleList<T>(ref List<T>_list)
{
for (int i = 0; i < _list.Count; i++)
{
Random random = new Random();
int rnd = random.Next(0, i);
T t1= _list[i];
T t2= _list[rnd];
Swap(ref t1 ,ref t2);
}
}
Hope this coudl help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.