c# HashSet & Hashtable
| Ağustos 30, 20171 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | /// <summary> /// IEnumerator , IQueryable ve diğerlerini HashSet e cevirir. /// </summary> /// <returns></returns> public static HashSet<T> ToHashSet<T>(this IEnumerable<T> Source) => new HashSet<T>(Source); /// <summary> /// IEnumerator , IQueryable ve diğerlerini Hashtable e cevirir. /// </summary> /// <returns></returns> public static Hashtable ToHashtable(this NameValueCollection source) { Hashtable _Hashtable = new Hashtable(); foreach (string key in source.Keys) { _Hashtable.Add(key, source[key].ToString()); } return _Hashtable; } /// <summary> /// Hashtable içerinde veri varmı diye bakar. /// </summary> /// <returns></returns> public static Boolean HashtableHasKeys(this Hashtable Source) => Source.Count == 0; |