An array was declared as follow. How do I get each value out from transArray? Thanks.
DanYeung
VB.NET:
Private transArray() as Transaction
Public MustInherit Class Transaction : Implements IComparable
Protected _dateTransactionDate As Date ' Date of the transaction
Protected _decimalAmount As Decimal ' Amount of the transaction
Protected _stringDescription As String ' Description of the transaction
Protected _transactionCode As enumTransactionCodes ' Code of the transaction
Public Const VALUE_DELIMITER As Char = "|"c
Public MustOverride Function CompareTo(ByVal obj As Object) As Integer Implements IComparable.CompareTo
Public MustOverride Property TransactionCode() As enumTransactionCodes
Public MustOverride ReadOnly Property IdentityString() As String
Public Property TransactionDate() As Date
Get
Return _dateTransactionDate
End Get
Set(ByVal Value As Date)
_dateTransactionDate = Value
End Set
End Property
Public Property Amount() As Decimal
Get
Return _decimalAmount
End Get
Set(ByVal Value As Decimal)
If (Value >= 0) Then
_decimalAmount = Value
Else
Throw New InvalidAmount(Value.ToString + " is an invalid amount.")
End If
End Set
End Property
Public Property Description() As String
Get
Return _stringDescription
End Get
Set(ByVal Value As String)
_stringDescription = Value
End Set
End Property
end class
Last edited by a moderator: