last ...
This commit is contained in:
@@ -1054,6 +1054,26 @@ namespace xCommons.Extensions
|
||||
return source;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts an Enumerable to HashSet ...
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="source"></param>
|
||||
/// <returns></returns>
|
||||
public static HashSet<T> ToHashSet<T>(this IEnumerable<T> source)
|
||||
{
|
||||
//
|
||||
var result = new HashSet<T>();
|
||||
if (source.IsNull())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result = [.. source];
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Select and Retrieve Nth Childs of given List ...
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user