












using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;namespace DelegateSample
{
public delegate void DelegateReportProgress(int progress);class Program
{
static void Main(string[] args)
{
CalculateClass c = new CalculateClass();
c.CalculateReportMethod = new DelegateReportProgress(ReportCalculateProgress);
c.CalculateBigNum();
Console.WriteLine("我想换一种报告的样式我可以:");
c.CalculateReportMethod
= new DelegateReportProgress(ReportCalculateProgress2); Console.ReadLine();
}
}
CalculateReportMethod(i);
}
}
}
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。