E
ESPNSTI
Hi,
I'm looking for a way to associate multiple "lists" of constants to each
other.
For example, I'd like a way to look up a database column's name based on its
"number" in a constants list.
I'm new to C# and my background is in Delphi, so below is an example of how
I would declare such a constant array of records in Delphi.
______________________________________________________
Type
TDBField =
Record
Number : Integer;
Name : String;
Description : String;
End;
Const
gcaDBFields : Array [0..2] Of TDBField =
(
(Number: 0; Name: ''; Description : ''),
(Number: 1000; Name: 'Field1'; Description: 'Field 1 Description'),
(Number: 2000; Name: 'Field2'; Description: 'Field 2 Description')
);
______________________________________________________
How do I accomplish the same in C#?
Thanks,
Erik
I'm looking for a way to associate multiple "lists" of constants to each
other.
For example, I'd like a way to look up a database column's name based on its
"number" in a constants list.
I'm new to C# and my background is in Delphi, so below is an example of how
I would declare such a constant array of records in Delphi.
______________________________________________________
Type
TDBField =
Record
Number : Integer;
Name : String;
Description : String;
End;
Const
gcaDBFields : Array [0..2] Of TDBField =
(
(Number: 0; Name: ''; Description : ''),
(Number: 1000; Name: 'Field1'; Description: 'Field 1 Description'),
(Number: 2000; Name: 'Field2'; Description: 'Field 2 Description')
);
______________________________________________________
How do I accomplish the same in C#?
Thanks,
Erik