This commit is contained in:
2026-11-16 23:11:57 +03:30
parent d1f940c44b
commit 939366fbb4
+20
View File
@@ -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>