C# ?????t???
???????????? ???????[ 2014/10/11 11:16:43 ] ????????NET c# ???????
?????????????????????????????????????????????????б??????????????????????????????????????????????е?????????????
????1. ????????????????
//define callback delegate
public delegate void CallBack(string result);
//process method
public void Processer(string args?? CallBack resultHandle)
{
//get result...
string result = "args is" + args;
//handle the result
resultHandle(result);
}
//handel the result
public void DisplayResult(string result)
{
Console.WriteLine(result);
}
//callback delegate example
public void Main()
{
Processer("??????????"?? new CallBack(DisplayResult));
}
?????????а????????????裺
????1. ?????????CallBack???????????????????????????
????2. ????????????????Processer???????????????????????????????????????????????????????????????????????????????
????3. ??????????巽??DisplayResult???÷???????????????????CallBack????????
????4. ??????????????Main???÷?????????????Processer????????“??????????”??????????????????ж??? new CallBack??DisplayResult????????DisplayResult???????ж????У????????Processer????????resultHandle????Precesser??????????????resultHandle(result);?????ж??????DisplayResult??????????????????????
??????????????????а???????????????·???PrintResult??????????????????????????????????????????????????????á???????????
??????

???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44