How to do "Compile time" initialization of record array?
- From: "John Kelsey" <kelseyj@xxxxxxxxxx>
- Date: Fri, 30 Dec 2005 11:36:48 -0600
Back in the "old" days with C, I used to do something like...
struct
{
char Description[20];
float price;
} Items[] =
{
{"Apple", 1.99},
{"Banana", 2.04}
};
If I wanted to do something similiar (and I do), does anyone have hints for
an obviously new C# programmer?
Any help is greatly appreciated,
John Kelsey
.
- Follow-Ups:
- Re: How to do "Compile time" initialization of record array?
- From: Jon Skeet [C# MVP]
- Re: How to do "Compile time" initialization of record array?
- From: Dave
- Re: How to do "Compile time" initialization of record array?
- Prev by Date: Re: C# user.config confusion
- Next by Date: Re: How to unload an assembly
- Previous by thread: C# user.config confusion
- Next by thread: Re: How to do "Compile time" initialization of record array?
- Index(es):
Relevant Pages
|