Hashtable.cs 515 B

1234567891011121314151617181920212223
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. namespace SharpCifs.Util.Sharpen
  4. {
  5. public class Hashtable : Dictionary<object, object>
  6. {
  7. public void Put(object key, object value)
  8. {
  9. if (this.ContainsKey(key))
  10. this[key] = value;
  11. else
  12. this.Add(key, value);
  13. }
  14. public object Get(object key)
  15. {
  16. return this.ContainsKey(key)
  17. ? this[key]
  18. : null;
  19. }
  20. }
  21. }