CharSequence.cs 646 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Text;
  2. namespace SharpCifs.Util.Sharpen
  3. {
  4. public class CharSequence
  5. {
  6. public static implicit operator CharSequence(string str)
  7. {
  8. return new StringCharSequence(str);
  9. }
  10. public static implicit operator CharSequence(StringBuilder str)
  11. {
  12. return new StringCharSequence(str.ToString());
  13. }
  14. }
  15. class StringCharSequence : CharSequence
  16. {
  17. string _str;
  18. public StringCharSequence(string str)
  19. {
  20. this._str = str;
  21. }
  22. public override string ToString()
  23. {
  24. return _str;
  25. }
  26. }
  27. }