C# equivalent of a C++ union ???

  • Thread starter Thread starter Peter Olcott
  • Start date Start date
Peter said:
What is the C# equivalent of a C++ union ???

C# does not have unions.

To help you with an alternative we need to know the real
problem.

Depending on the circumstances BitConverter, BinaryReader/Writer
and StructLayout may all be solutions.

Arne
 
C# does not have unions.

To help you with an alternative we need to know the real
problem.

Depending on the circumstances BitConverter, BinaryReader/Writer
and StructLayout may all be solutions.

Arne

StructLayout is usually used for this purpose. Depends on requirements
it may change.
 
Back
Top