- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 94字
- 2021-07-02 15:29:23
Adding delegates
In the first stage, you have to add delegates. While you could put these into a separate file, for our purposes let's just place them here. So, enter the following above the line beginning with public partial class...:
public delegate bool Compare(double x, double y);
Remember, delegates are function or method wrappers, actually. Then, directly below this line, enter the following:
public delegate double Multiply(double x, double y);
You can see here that we have two delegates. One returns a Boolean data type, and the other one returns a double data type.
推薦閱讀
- Go Web編程
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- jQuery EasyUI網站開發實戰
- Practical Data Science Cookbook(Second Edition)
- Python金融數據分析
- HTML5入門經典
- Linux:Embedded Development
- Python深度學習:模型、方法與實現
- Node.js開發指南
- Laravel Application Development Blueprints
- Machine Learning for Developers
- Learning Jakarta Struts 1.2: a concise and practical tutorial
- iOS Development with Xamarin Cookbook
- 計算機常用算法與程序設計教程(第2版)
- 少年小魚的魔法之旅:神奇的Python