diff --git a/docs/languages/dotnet/csharp/csharp.md b/docs/languages/dotnet/csharp/csharp.md index 4864752..a06f8ce 100644 --- a/docs/languages/dotnet/csharp/csharp.md +++ b/docs/languages/dotnet/csharp/csharp.md @@ -2215,13 +2215,14 @@ Delegate lambda = (Type input) => ; Delegate lambda = input => { return ; }; Delegate lambda = (input) => { return ; }; Delegate lambda = (Type input) => { return ; }; +Delegate lambda = (Type input = default) => { return ; }; // lambda default parameter // static modifier prevents unintentional capture of local variables or instance state by the lambda Delegate lambda = (static Type input) => ; Type variable = delegate { ; }; // ignore arguments of the method passed to the delegate -// lambda type inference [C# 10] +// lambda type inference var f = Console.WriteLine; var f = x => x; // inferring the return type var f = (string x) => x; // inferring the signature @@ -2975,7 +2976,6 @@ unsafe [ptr_math]: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/unsafe-code#pointer-arithmetic [ptr_comparison]: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/unsafe-code#pointer-comparison [stack_alloc]: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/unsafe-code#stack-allocation -[fixed_buffers]: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/unsafe-code#fixed-size-buffers ### Native Memory