|
Culture-Sensitive C# Attribute
The following lists the named, optional parameters for StructLayout: Internationalization (I18n) Method OverviewThe StructLayout attribute allows control over the physical layout of a class or structure's data fields. As a minimum requirement, you must supply theLayoutKind (set to either Auto , Explicit or Sequential ).
You apply this attribute to classes or structures.
For more information see Microsoft's MSDN online documentation. I18n IssuesThe default for the CharSet parameter is ANSI, which causes character corruption if Unicode text not matching the current system code page is passed to the StructLayout class. While having unmapped characters could pose a security risk, the bigger issue from an internationalization perspective is that Unicode will not be supported unless CharSet is explicitly specified.
Instead of this:
|