Skip to content

Commit

Permalink
Update 2023-11-08-opt-in-to-experimental-apis-using-csharp-12-experim…
Browse files Browse the repository at this point in the history
…entalattribute.markdown
  • Loading branch information
maartenba committed Nov 8, 2023
1 parent 9aa61a1 commit c1bb20d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ For reference, here's an example:
public static IEndpointConventionBuilder MapSpaceAttachmentProxy(this IEndpointRouteBuilder endpoints, string path)
```

**Edit:** [Simon Cropp](https://mastodon.online/@simoncropp@hachyderm.io/111374391779034564) mentioned his [Polyfill project](https://github.com/SimonCropp/Polyfill/pull/102) to alsbo be able to use the `ExperimentalAttribute` with older framework/language versions. Check it out!

## Closing thoughts

While not as smooth as the [API opt-in feature in Kotlin](https://kotlinlang.org/docs/opt-in-requirements.html), I like that C#12 now introduces a way to inform users that an API is experimental, and let them explicitly opt-in to its use (by suppressing the error).
Expand Down

0 comments on commit c1bb20d

Please sign in to comment.