You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.
C# structs that are designed to map to known C++ structures for the purposes of P/Invoke'ing are expected to have names that match the original C++ names. CodeFormatter should not add an "_" to those fields, even if the field's visibility is "private."
Two reasons I might put "private" on such a field:
It represents a union field and I choose to hide it and replace them with strongly typed properties that validate or assert the union discriminator.
It represents an obscure/dangerous/hard-to-marshal field that I know my library doesn't reference so I choose to mark it NYOB and have the "private" visibility enforce that.
A good rule for deciding whether a struct is an "interop type" might be to check if the author explicitly added the [StructLayout(Sequential/Explicit)] tag the struct.
The text was updated successfully, but these errors were encountered:
C# structs that are designed to map to known C++ structures for the purposes of P/Invoke'ing are expected to have names that match the original C++ names. CodeFormatter should not add an "_" to those fields, even if the field's visibility is "private."
Two reasons I might put "private" on such a field:
A good rule for deciding whether a struct is an "interop type" might be to check if the author explicitly added the [StructLayout(Sequential/Explicit)] tag the struct.
The text was updated successfully, but these errors were encountered: