P
Peri
Dear All,
I have written a common array class which has insert, search and other
functions.
For Example (Code in VB.NET):
' Client Class
Public Class Client
Public ClientCode As String 'Key Field
Public ClientName As String
...
End Class
'Client Array Class - Similar to a Vector Class
Public Class ClientArray
Private _ArrayIn() As Client
'Inserts the value into the _ArrayIn()
Public Function Insert(ByVal value As Client) As Long
....
End Function
'Searches the array
Public Function Search(ByVal value As Client) As Long
' GetSearchKey - Use this function to get the value in the "_ArrayIn()"
and "value" and compare
....
End Function
' Gets the search key.
Private Function GetSearchKey(ByVal value As Client) As String
Return value.ClientCode
End Function
End Class
Similary I have many classes like the Client Class, Say
' Scrip Class
Public Class Scrip
Public ScripCode As Integer 'Key Field
Public ScripName As String
Public Exchange As Short
Public Symbol As String
Public Market As String
...
End Class
Instead of creating a ScripArray Class with the same functionality as the
ClientArray Class, Can I make a Common Array Class and create a instance of
the Common Array Class with Type as Client or Scrip?
Please help me out
I have written a common array class which has insert, search and other
functions.
For Example (Code in VB.NET):
' Client Class
Public Class Client
Public ClientCode As String 'Key Field
Public ClientName As String
...
End Class
'Client Array Class - Similar to a Vector Class
Public Class ClientArray
Private _ArrayIn() As Client
'Inserts the value into the _ArrayIn()
Public Function Insert(ByVal value As Client) As Long
....
End Function
'Searches the array
Public Function Search(ByVal value As Client) As Long
' GetSearchKey - Use this function to get the value in the "_ArrayIn()"
and "value" and compare
....
End Function
' Gets the search key.
Private Function GetSearchKey(ByVal value As Client) As String
Return value.ClientCode
End Function
End Class
Similary I have many classes like the Client Class, Say
' Scrip Class
Public Class Scrip
Public ScripCode As Integer 'Key Field
Public ScripName As String
Public Exchange As Short
Public Symbol As String
Public Market As String
...
End Class
Instead of creating a ScripArray Class with the same functionality as the
ClientArray Class, Can I make a Common Array Class and create a instance of
the Common Array Class with Type as Client or Scrip?
Please help me out