fork download
  1. using System;
  2.  
  3. public class CStr
  4. {
  5. string str;
  6. byte len;
  7. public CStr()
  8. {
  9. this.str = "";
  10. this.len = 0;
  11. }
  12. public CStr(string str)
  13. {
  14. this.str = str;
  15. this.len = (byte)str.Length;
  16. }
  17. public CStr(char c)
  18. {
  19. this.str = c.ToString();
  20. this.len = 1;
  21. }
  22. public byte Lenght
  23. {
  24. get
  25. {
  26. return this.len;
  27. }
  28. }
  29. public void Clear()
  30. {
  31. this.str = "";
  32. }
  33. public static CStr operator +(CStr a, CStr b)
  34. {
  35. CStr ab = new CStr(a.str + b.str);
  36. return ab;
  37. }
  38. public static bool operator ==(CStr a, CStr b)
  39. {
  40. if (a.str.CompareTo(b.str) == 0)
  41. {
  42. return true;
  43. }
  44. else return false;
  45. }
  46. public static bool operator !=(CStr a, CStr b)
  47. {
  48. if (a.str.CompareTo(b.str) == 0)
  49. {
  50. return false;
  51. }
  52. else return true;
  53. }
  54. public void Show()
  55. {
  56. Console.WriteLine(str);
  57. }
  58. }
  59. class Program
  60. {
  61. public static void Main()
  62. {
  63. //Console.ReadKey(true);
  64. }
  65. }
Success #stdin #stdout 0.02s 13872KB
stdin
Standard input is empty
stdout
Standard output is empty