Array or ?

O

olesen

Hello All

I'm not a champion in C # & Array, etc. :-(

But I have a challenge which will be simple in a table, but how do I
cope with it in an array or similar ...

I would like to save 5 forskillige values in a "record" ...

Preview

1. Row: "test1", 2.25, 3.00, "Table"; 10
2. Row: "test2"; 2.25, 3.00, "Test"; 10
3. Row: "test3", 2.25, 3.00, "Bold"; 10
Etc. .....
It can be between 4 and 200 lines ...

I'm trying myself with my own "Savedata class" but I can not really
get into it ...

Is there a friendly soul who can help with an example?

Thanks in advance ...

/ / MOL
 
M

Morten Wennevik [C# MVP]

Hi Olesen,

Well, you could create a Record class with five properties representing
those five values. The Savedata class would then have a List<Record>. Or if
by Savedata class you mean a single line, create a Savedata class with a
property for each value instead, and use a List<Savedata> to hold all the
lines. If you want to display this list you can use it as a Datasource in a
DataGridView.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top