Attributes for Positional Records' primary constructor #4199
Answered
by
YairHalberstadt
pinkfloydx33
asked this question in
Q&A
-
Is it possible to add attributes to the constructor of a positional The most I've been able to find are ways to add attributes to the type itself, the constructor parameters, the properties and their backing fields: [Baz]
public record Foo(
[Baz] [field: Baz] [property: Baz] int Bar
);
public class BazAttribute : Attribute {} I tried various other targets such as I'll note that I don't currently have a specific use case for this; however playing around with records and being a reflection-junkie, I found myself curious. Is there some attribute target I'm unaware of? |
Beta Was this translation helpful? Give feedback.
Answered by
YairHalberstadt
Dec 7, 2020
Replies: 1 comment 1 reply
-
discussed at: #3650 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pinkfloydx33
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
discussed at: #3650