public static IEnumerable<T> RemovalRepetition<T, R>(this IEnumerable<T> obj, Func<T, R> attribute)
{
return obj.Cast<T>().GroupBy(attribute).Select(w => w.FirstOrDefault());
}
private void aa()
{
DataTable dt = new DataTable();
dt.AsEnumerable().RemovalRepetition(w => w.Field<string>("id"));
}