Mega Code Archive
Load elements into a generic list from an array
//http://tinyerp.codeplex.com/
//GNU Library General Public License (LGPL)
//-----------------------------------------------------------------------
//
// Copyright (c) Pyramid Consulting. All rights reserved.
//
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace Bamboo.Core.Common
{
public class SysUtil
{
///
/// Load elements into a generic list from an array
///
/// type of the element
/// dest list
/// source array
public static void LoadListFromArray(System.Collections.Generic.List list, T[] array)
{
list.Clear();
for (int i = 0; i < array.Length; i++)
{
list.Add(array[i]);
}
}
}
}