Skip to content

Commit 183f2ec

Browse files
authored
Update using-delegates.md (#36455)
Fixes #36454
1 parent 49d553f commit 183f2ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/csharp/programming-guide/delegates/using-delegates.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "Using Delegates - C# Programming Guide"
33
description: Learn how to use delegates. Delegates are an object-oriented, type safe, and secure type that safely encapsulates a method.
4-
ms.date: 07/20/2015
4+
ms.date: 07/31/2023
55
helpviewer_keywords:
66
- "delegates [C#], how to use"
77
ms.assetid: 99a2fc27-a32e-4a34-921c-e65497520eec
88
---
99
# Using Delegates (C# Programming Guide)
1010

11-
A [delegate](../../language-reference/builtin-types/reference-types.md) is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a delegate is defined by the name of the delegate. The following example declares a delegate named `Del` that can encapsulate a method that takes a [string](../../language-reference/builtin-types/reference-types.md) as an argument and returns [void](../../language-reference/builtin-types/void.md):
11+
A [delegate](../../language-reference/builtin-types/reference-types.md) is a type that safely encapsulates a method, similar to a function pointer in C and C++. Unlike C function pointers, delegates are object-oriented, type safe, and secure. The type of a delegate is defined by the name of the delegate. The following example declares a delegate named `Callback` that can encapsulate a method that takes a [string](../../language-reference/builtin-types/reference-types.md) as an argument and returns [void](../../language-reference/builtin-types/void.md):
1212

1313
[!code-csharp[csProgGuideDelegates#21](~/samples/snippets/csharp/VS_Snippets_VBCSharp/csProgGuideDelegates/CS/Delegates.cs#21)]
1414

0 commit comments

Comments
 (0)