我如何List
在牛肉中洗牌?我想添加一个扩展来就地Random
洗牌:List
using System.Collections.Generic;
namespace System
{
extension Random
{
public virtual void Shuffle<T>(List<T> list)
{
// Use this to shuffle the list in-place
}
}
}