mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-01-07 16:49:58 +01:00
Update improvements.md
This commit is contained in:
parent
6079b9ea44
commit
1af53dd6aa
|
|
@ -483,7 +483,7 @@ Will give the following compile error:
|
|||
CS8803: Top-level statements must precede namespace and type declarations.
|
||||
```
|
||||
|
||||
If you try to enter it along with the following code in `Program.cs`:
|
||||
If you try to enter it before the following code in `Program.cs`:
|
||||
|
||||
```cs
|
||||
// create a delegate instance that points to the method
|
||||
|
|
@ -493,7 +493,7 @@ DelegateWithMatchingSignature d = new(p1.MethodIWantToCall);
|
|||
int answer2 = d("Frog");
|
||||
```
|
||||
|
||||
In the next edition, I will add a note to warn the reader either not to enter this code, or to tell them to put the in a separate file, as shown in the following code:
|
||||
In the next edition, I will add a note to warn the reader either not to enter this code, or to tell them to put at the bottom of `Program.cs` or in a separate file, as shown in the following code:
|
||||
```cs
|
||||
// In a separate file like Program.Delegates.cs.
|
||||
delegate int DelegateWithMatchingSignature(string s);
|
||||
|
|
|
|||
Loading…
Reference in a new issue