Пример #1
0
        static void Main(string[] args)
        {
            // StrShift x;
            // x = "Microsoft";

            // string s = x << 1;
            // Console.WriteLine("Result: {0}", s<<1);

            StrShift example;

            example = "Microsoft";
            //Console.WriteLine("{0}\n", (example >> 3));
            // Console.WriteLine("{0}\n", example.ToString());
            StrShift example2 = "Microsoft";

            Console.WriteLine("{0}\n", example == example2);
            string input = Console.ReadLine();
        }
Пример #2
0
        public override bool Equals(System.Object obj)
        {
            // If parameter is null return false.
            if (obj == null)
            {
                return(false);
            }

            // If parameter cannot be cast to Point return false.
            StrShift p = obj as StrShift;

            if ((System.Object)p == null)
            {
                return(false);
            }

            // Return true if the fields match:
            return(this.Stored == p.Stored);
        }