Create a record

I

Ivan Sammut

Hi,

Is there a possibilty in c# to create a record make up for
example of an Integer, string & char

Thanks
Ivan Sammut
 
W

William Ryan

If you are talking about in a DataTable, you can create a Table with colums
of each respective type, thereafter each new datarow will be comprised of
one column of each type.

However, it sounds like you may be wanting to create a struct

struct whatever{
int InValue;
string StringValue;
...
}
 
P

Pablo M. Cibraro

Hi Ivan,
in the .Net framework, the records can be replaced with "Structures".
Eg,

public struct Sample
{
public int p1;
public string p2;
public char p3;
}

I hope this can help you
Pablo Cibraro
 

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

Similar Threads


Top