Пример #1
0
            static void Main(String[] args)
            {
                csharp s1 = new csharp(5, 6, 8);
                csharp s3 = new csharp();

                s3 = -s1;
                s3.display();
            }
Пример #2
0
        public static csharp operator -(csharp s1)
        {
            csharp t = new csharp();

            t.x = -s1.x;
            t.y = -s1.y;
            t.z = -s1.z;
            return(t);
        }