Open AraHaan opened 4 months ago
Same general feedback as given on the issue. I'm not particularly a fan of this, as its potentially lossy and brings in a new dependency.
This really seems like something where a user could provide extension methods for their own library to solve the need.
Proposal Implementation
Adds an implicit conversion operator from
RECT
->Rectangle
with an explicit operator fromRectangle
back toRECT
when the rectangle needs converted to anRECT
for calls into Windows APIs that requires it. Also with operators handling these conversions programmers would worry less on if they got their conversion betweenRECT
<->Rectangle
correct or not by eliminating all the guess work from it. Unit tests of the operators will come soon. As such I opened this pull request as a draft.Implements/Fixes https://github.com/terrafx/terrafx.interop.windows/issues/387.