I am clearly getting a concept wrong somewhere but I cannot see why this cannot be done; it appears logical to me this should be possible.
I am building a class within vb.net and have created a structure within the class:
I have then based a variable on this structure:
The thing is, I want the variable to be public but I do not want the structure to be available outside of the class.
Therefore, logically, I want the structure to be PRIVATE and the variable to be PUBLIC but I get told by VB.NET that this is not possible or permitted.
Is there a methodology I am missing or a logical step I am ignoring or am I simply misguided?
I am building a class within vb.net and have created a structure within the class:
Code:
Structure flags
Dim carry_flag As Boolean ' Holds the carry out of the MSB in any arithmetic operation. In subtraction, holds 0 if borrowed and 1 if not
Dim zero_flag As Boolean ' Set to 1 when an operation produces a zero result
Dim interrupt_flag As Boolean ' Enables (0) or disables (1) interrupts
Dim decimal_flag As Boolean ' If 1, any ADC or SBC is treated as BCD, with the result also being BCD
Dim brk_flag As Boolean ' Set (1) if software interrupt (BRK) is executed
Dim overflow_flag As Boolean ' Set (1) when an arithmetic operation results in a value too large to be represented in a byte
Dim sign_flag As Boolean ' Set (1) if the result of an operation is negative
End StructureCode:
Public status_register As flagsTherefore, logically, I want the structure to be PRIVATE and the variable to be PUBLIC but I get told by VB.NET that this is not possible or permitted.
Is there a methodology I am missing or a logical step I am ignoring or am I simply misguided?