Skip to content

Commit

Permalink
Minor typos (#2294)
Browse files Browse the repository at this point in the history
  • Loading branch information
castrodd authored Aug 6, 2024
1 parent 7140e04 commit 20dcbc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions concepts/extension-methods/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ namespace MyExtensions
// => 2
```

Extension methods are brought into scope at the namespace level. This means that if you are in different namespace to the one the extension method is defined in, it's namespace must be in a `using` directive first; For example, if we wanted to use the above example in our code, we would first need a `using MyExtensions` directive. If you are in the same namespace as the one the extension method is defined in, you can use the extension methods without a `using` directive.
Extension methods are brought into scope at the namespace level. This means that if you are in different namespace to the one the extension method is defined in, its namespace must be in a `using` directive first; for example, if we wanted to use the above example in our code, we would first need a `using MyExtensions` directive. If you are in the same namespace as the one the extension method is defined in, you can use the extension methods without a `using` directive.

A well-known example of extension methods are the [LINQ][linq] standard query operators that add query functionality to the existing IEnumerable types. To bring these into scope we need a `using System.Linq;` directives.
A well-known example of extension methods are the [LINQ][linq] standard query operators that add query functionality to the existing IEnumerable types. To bring these into scope we need a `using System.Linq;` directive.

[linq]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/
[extension-methods]: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/extension-methods

0 comments on commit 20dcbc8

Please sign in to comment.