how would this struct look in .NET using C#

M

Maersa

Hi All,

How would the following struct be declared in .NET

typedef struct tag_SCRIPT_CONTROL {
DWORD uDefaultLanguage :16;
DWORD fContextDigits :1;
DWORD fInvertPreBoundDir :1;
DWORD fInvertPostBoundDir :1;
DWORD fLinkStringBefore :1;
DWORD fLinkStringAfter :1;
DWORD fNeutralOverride :1;
DWORD fNumericOverride :1;
DWORD fLegacyBidiClass :1;
DWORD fReserved :8;
} SCRIPT_CONTROL;

thanks,
 
C

Chris Taylor

Hi,

You can not use bit fields in a struct, you will have to emulate the
functionality using either BitVector32 (beware of a bug in this class with
the most significant bit not being handled correctly) or a BitArray.

Hope this helps
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top