The Labs \ Source Viewer \ SSCLI \ System.Collections.Specialized \ CollectionsUtil

  1. //------------------------------------------------------------------------------
  2. // <copyright file="CollectionsUtil.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. // Wrapper for a case insensitive Hashtable.
  16. namespace System.Collections.Specialized
  17. {
  18.    
  19.     using System.Collections;
  20.    
  21.     /// <devdoc>
  22.     /// <para>[To be supplied.]</para>
  23.     /// </devdoc>
  24.     public class CollectionsUtil
  25.     {
  26.        
  27.         /// <devdoc>
  28.         /// <para>[To be supplied.]</para>
  29.         /// </devdoc>
  30.         public static Hashtable CreateCaseInsensitiveHashtable()
  31.         {
  32.             return new Hashtable(StringComparer.CurrentCultureIgnoreCase);
  33.         }
  34.        
  35.         /// <devdoc>
  36.         /// <para>[To be supplied.]</para>
  37.         /// </devdoc>
  38.         public static Hashtable CreateCaseInsensitiveHashtable(int capacity)
  39.         {
  40.             return new Hashtable(capacity, StringComparer.CurrentCultureIgnoreCase);
  41.         }
  42.        
  43.         /// <devdoc>
  44.         /// <para>[To be supplied.]</para>
  45.         /// </devdoc>
  46.         public static Hashtable CreateCaseInsensitiveHashtable(IDictionary d)
  47.         {
  48.             return new Hashtable(d, StringComparer.CurrentCultureIgnoreCase);
  49.         }
  50.        
  51.         /// <devdoc>
  52.         /// <para>[To be supplied.]</para>
  53.         /// </devdoc>
  54.         public static SortedList CreateCaseInsensitiveSortedList()
  55.         {
  56.             return new SortedList(CaseInsensitiveComparer.Default);
  57.         }
  58.        
  59.     }
  60.    
  61. }

Developer Fusion