How to represent a union with structures in it in VB.Net

V

Vinay Kodam

Hi all,

I have a union with two structures in it as shown below. The source code is
written in VC++. I want to represent the same in VB.Net.

union {
struct {
LONG lMinimum;
LONG lMaximum;
};
struct {
DWORD dwMinimum;
DWORD dwMaximum;
};
DWORD dwReserved[6];
}Bounds;

How should i go about it. Can anyone help me.

Regards
Vinay
 
M

Mattias Sjögren

Vinay,

The easiest way seems to be

Structure Bounds
Public minimum As Integer
Public maximum As Integer
Private r0, r1, r2, r3 As Integer
End Structure



Mattias
 
M

Mohamoss

Hi vinary
in vb you have only structure , you can build container structure that
wouldcontain both
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

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