How does equality work in CsWinRT? #2238
-
|
I'm upgrading a large C# UWP project from .Net Native to .Net 10 + CsWinRT. One thing I noticed is I got lots of warnings about reference vs value equality when using == between a projected class and either an interface or the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
The operator compares the underlying pointer to the COM object, so it should be equal for the same COM object. Don't see that changing with CsWinRT 3.0 |
Beta Was this translation helpful? Give feedback.
-
|
OK, had a good discussion in #2246 which confirmed that the |
Beta Was this translation helpful? Give feedback.
OK, had a good discussion in #2246 which confirmed that the
==andEqualsoverloads are not needed and will probably be removed in CsWinRT 3.0.