Sie sind auf Seite 1von 1

using

using
using
using

System;
System.Collections.Generic;
System.Linq;
System.Text;

namespace ConsoleApplication13
{
class Program
{
int a;
public Program()
{
a = 10;
}
public static Program operator -(Program obj)
{
obj.a = -obj.a;
return obj;
}
public void display()
{
Console.WriteLine("number is{0}", a);
}
public static void Main()
{
Program aa = new Program();
aa.display();
aa = -aa;
aa.display();
Console.ReadLine();
}
}
}

Das könnte Ihnen auch gefallen