using System;
namespace UCOM.HR{
public delegate string FunctionPointer(string Name);
public class HumanResource{
public static string aFunction (string Name){
return "A Say Hello To "+Name;
}
public static string bFunction (string Name){
return "B Say Hello To "+Name;
}
public static void aMethod(FunctionPointer aFunctionPointer){
console.writeLine(aFunctionPointer("MILES"));
}
public static int Main(){
FunctionPointer a=new FunctionPointer(aFunction);//不知道怎么理解这个红色的东西,是字符串还是什么?
FunctionPointer b=new FunctionPointer(bFunction);
aMethod(a);
aMethod(b);
retrun 0;
}
}
}
请高手给我大概的说一下,这个程序,我不明白怎么回事?