Skip to content

Commit 6a9ce98

Browse files
authored
revise example metadata (#706)
1 parent 5d4c8ab commit 6a9ce98

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

standard/delegates.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Delegate types in C# are name equivalent, not structurally equivalent.
5757

5858
> *Example*:
5959
>
60-
> <!-- Example: {template:"standalone-lib", name:"DelegateDeclarations"} -->
60+
> <!-- Example: {template:"standalone-lib-without-using", name:"DelegateDeclarations"} -->
6161
> ```csharp
6262
> delegate int D1(int i, double d);
6363
> delegate int D2(int c, double d);
@@ -92,7 +92,7 @@ This definition of consistency allows covariance in return type and contravarian
9292
9393
> *Example*:
9494
>
95-
> <!-- IncompleteExample: {template:"standalone-lib", name:"DelegateCompatibility1", replaceEllipsis:true, expectedErrors:["x","x"], expectedWarnings:["x","x"]} -->
95+
> <!-- Example: {template:"standalone-lib-without-using", name:"DelegateCompatibility1", replaceEllipsis:true, customEllipsisReplacements: ["return default;", "return default;", "return;", "return default;", "return;", "return default;", "return default;"]} -->
9696
> ```csharp
9797
> delegate int D1(int i, double d);
9898
> delegate int D2(int c, double d);
@@ -122,7 +122,7 @@ This definition of consistency allows covariance in return type and contravarian
122122
<!-- markdownlint-enable MD028 -->
123123
> *Example*:
124124
>
125-
> <!-- IncompleteExample: {template:"standalone-lib", name:"DelegateCompatibility2", replaceEllipsis:true, expectedOutput:["x", "x", "x"], expectedErrors:["x","x"], expectedWarnings:["x","x"]} -->
125+
> <!-- Example: {template:"standalone-lib-without-using", name:"DelegateCompatibility2", replaceEllipsis:true, customEllipsisReplacements: ["return default;", "return default;"] } -->
126126
> ```csharp
127127
> delegate bool Predicate<T>(T value);
128128
>
@@ -173,7 +173,7 @@ An instance of a delegate is created by a *delegate_creation_expression* ([§11.
173173
174174
> *Example*:
175175
>
176-
> <!-- Example: {template:"standalone-console", name:"DelegateInstantiation1", replaceEllipsis:true} -->
176+
> <!-- Example: {template:"standalone-console-without-using", name:"DelegateInstantiation1", replaceEllipsis:true} -->
177177
> ```csharp
178178
> delegate void D(int x);
179179
>
@@ -205,7 +205,7 @@ Delegates are combined using the binary `+` ([§11.9.5](expressions.md#1195-add
205205
206206
> *Example*: The following example shows the instantiation of a number of delegates, and their corresponding invocation lists:
207207
>
208-
> <!-- Example: {template:"standalone-console", name:"DelegateInstantiation2", replaceEllipsis:true} -->
208+
> <!-- Example: {template:"standalone-console-without-using", name:"DelegateInstantiation2", replaceEllipsis:true} -->
209209
> ```csharp
210210
> delegate void D(int x);
211211
>
@@ -261,8 +261,6 @@ Attempting to invoke a delegate instance whose value is `null` results in an exc
261261
>
262262
> <!-- Example: {template:"standalone-console", name:"DelegateInvocation", inferOutput:true} -->
263263
> ```csharp
264-
> using System;
265-
>
266264
> delegate void D(int x);
267265
>
268266
> class C

0 commit comments

Comments
 (0)