- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 79字
- 2025-04-04 18:04:55
Making the delegate
Enter using System as usual at the very top of the file. Next, to make a delegate, enter the following:
delegate double CompareValues(double x, double y);
In this line, you have a delegate class. It returns a double and accepts two double data types. So, it encapsulates functions that have that kind of signature.
In the next stage, you'll enter the following within curly braces:
public partial class_Default: System.Web.UI.Page
This line inherits from Page as usual.