UnsafeAccessorAttribute with properties #97417
Answered
by
AaronRobinsonMSFT
RikkiGibson
asked this question in
Q&A
-
re: #81741 It looks like there isn't an explicit mention of properties here. Is it expected/supported to use |
Beta Was this translation helpful? Give feedback.
Answered by
AaronRobinsonMSFT
Jan 23, 2024
Replies: 1 comment 2 replies
-
@RikkiGibson Yes, properties are supported and work as one would imagine. See the following test for calling a the getter and setter on a property. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
RikkiGibson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@RikkiGibson Yes, properties are supported and work as one would imagine. See the following test for calling a the getter and setter on a property.
https://github.com/dotnet/runtime/blob/6f24dbcfccde55accd5a9fa0a86f1f4cf8fa1075/src/tests/baseservices/compilerservices/UnsafeAccessors/UnsafeAccessorsTests.cs#L377C1-L382C73