public static void ResizeList <T>(List <T> list, int size) { if (list == null) { throw new ArgumentNullException("list"); } if (size < 0 || size > list.Capacity) { throw new ArgumentException("list", "invalid size to resize."); } if (size != list.Count) { NoAllocHelpers.Internal_ResizeList(list, size); } }
public static void ResizeList <T>(List <T> list, int size) { bool flag = list == null; if (flag) { throw new ArgumentNullException("list"); } bool flag2 = size <0 || size> list.Capacity; if (flag2) { throw new ArgumentException("invalid size to resize.", "list"); } bool flag3 = size != list.Count; if (flag3) { NoAllocHelpers.Internal_ResizeList(list, size); } }