I'm very new to resources in C# / .Net files.
I need to store a table of operational data in a resource file (*.RESX
), and cannot figure out how to do it.
If I were to do it hardcoded in C, I'd do it like this:
struct {
int inputA;
int outputB;
} dataPoint;
dataPoint myOpsData[] = { { 0, 2000},
{10, 4000},
{20, 6300},
{30, 8400},
{40, 10620} };
The most straightforward in the Visual Studio 2010 editor is with Strings, but that only maps a string to a value. If I were to do this, my dataset would look something like:
Name: Value:
----- ------
PerfData1 { 0, 2000}
PerfData2 {10, 4000}
PerfData3 {20, 6300}
PerfData4 {30, 8400}
PerfData5 {40, 10620}
But this format would require a lot of parsing and associated validation and error handling that just seems unnecessary.
How can I represent arrays of data-points (or even more complex data-types) in a .RESX resource file?