satish babu

satish babu

  • 1.1k
  • 633
  • 85.7k

How to pass the elements into list template

Aug 19 2011 7:59 AM
hi friends,i have a small doubt.I am working with console applications by using xml.First i am taking an xml file with elements id,name,sal.
<employee>
<emp>
<id>1<id>
<name>abc</name>
<sal>1000</sal>
</emp>
.....
</employee>

My requirement is i am taking one class like
class employee
{
int id;
string name;
float sal;
}
class company
{
list<employee> ll=new list<employee>();
public void add(...)
public void show(...)
}
main()
{
add(..)-->for adding the elements into xml file
show(...)-->is used to show the xml data
}

can u help the coding?

Answers (4)