帮我做做这个题目

来源:百度知道 编辑:UC知道 时间:2024/06/21 02:13:14
下列程序是对运算符“++”进行重载,请将程序补充完整
using System;
class CZ{
int a=0;public________________operator ++<______________>
{
y.a=y.a+2;
return_______________;
}
static void Main<> {
CZ x=new CZ< >;
x++;
Console.WriteLine<x.a>;
}
}
你这个我怎么看不懂

class CZ
{
int a=0;
public static CZ operator ++( CZ y)
{
y.a=y.a+2;
return y;
}
static void Main<> {
CZ x=new CZ< >;
x++;
Console.WriteLine<x.a>;
}
}

操作符重载

我要这个题目的输出的结果!!!
这样才肯能作出来!