I built a generic method that suits me well, but I'm having difficulty calling this method.
public List<T> CriaLista<T>(params T[] pars)
{
List<T> lista = new List<T>();
foreach (T elem in pars)
{
lista.Add(elem);
}
return lista;
}
I need to return a list of type T
same. But I'm not sure how to call this list.