Create a record

  • Thread starter Thread starter Ivan Sammut
  • Start date Start date
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
 
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;
...
}
 
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
 
Back
Top