RosettaCodeData/Task/Bitmap/Visual-Basic-.NET/bitmap-1.visual
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

23 lines
489 B
Text

' The StructLayout attribute allows fields to overlap in memory.
<System.Runtime.InteropServices.StructLayout(LayoutKind.Explicit)> _
Public Structure Rgb
<FieldOffset(0)> _
Public Rgb As Integer
<FieldOffset(0)> _
Public B As Byte
<FieldOffset(1)> _
Public G As Byte
<FieldOffset(2)> _
Public R As Byte
Public Sub New(ByVal r As Byte, ByVal g As Byte, ByVal b As Byte)
Me.R = r
Me.G = g
Me.B = b
End Sub
End Structure