- 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.
推薦閱讀
- Practical Data Analysis Cookbook
- 演進式架構(原書第2版)
- 基于粒計算模型的圖像處理
- 測試驅動開發:入門、實戰與進階
- Lua程序設計(第4版)
- Python程序設計
- SharePoint Development with the SharePoint Framework
- Getting Started with Laravel 4
- Learning Vaadin 7(Second Edition)
- .NET 3.5編程
- 51單片機C語言開發教程
- OpenGL Data Visualization Cookbook
- Couchbase Essentials
- App Inventor少兒趣味編程動手做
- Julia High Performance(Second Edition)