O
Oberon
I want to create a collection of records which will be permanently
available at the application level in an ASP.NET application.
How should I go about that?
Lets say that the record structure has 4 fields with these types:
type field name
============
integer recordID
string title
bool live
DateTime meetTime
The data should be held in a collection and will be static (making it
available at the application level).
Should I?
1. create a struct for the record.
3. create the collection class
3. create an Add method to add a struct to the collection class
4. use the Add method to add new instances of the struct
OR should I be doing this will a class instead of a struct?, or does
it depend on what else I might want to do with my collection class?
PS: I have a code example of how to do this in VB.NET but I will do it
in C#. The VB.NET uses a collection class where each member is a class
of the record type. But VB.NET doesn't have structs, does it?
available at the application level in an ASP.NET application.
How should I go about that?
Lets say that the record structure has 4 fields with these types:
type field name
============
integer recordID
string title
bool live
DateTime meetTime
The data should be held in a collection and will be static (making it
available at the application level).
Should I?
1. create a struct for the record.
3. create the collection class
3. create an Add method to add a struct to the collection class
4. use the Add method to add new instances of the struct
OR should I be doing this will a class instead of a struct?, or does
it depend on what else I might want to do with my collection class?
PS: I have a code example of how to do this in VB.NET but I will do it
in C#. The VB.NET uses a collection class where each member is a class
of the record type. But VB.NET doesn't have structs, does it?