Is it possible to create an extension method for interpolated string handler? #80346
-
It seems that compiler infers string in this case:
If |
Beta Was this translation helpful? Give feedback.
Answered by
CyrusNajmabadi
Sep 18, 2025
Replies: 1 comment 4 replies
-
No. Extensions only operate on things that have types. And the type of the thing is determined first before extensions are considered. This is something we've considered for the future, but that happens over at dotnet/csharplang. Thanks. |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
CyrusNajmabadi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No. Extensions only operate on things that have types. And the type of the thing is determined first before extensions are considered. This is something we've considered for the future, but that happens over at dotnet/csharplang. Thanks.