How would I go about doing this:
for( var i = 0; i < emp; i++ )
{
Console.WriteLine("Name: ");
var name = Console.ReadLine();
Console.WriteLine("Nationality:");
var country = Console.ReadLine();
employeeList.Add( new Employee(){
Name = name,
Nationality = country
} );
}
I want a test run of, for example:
Imran Khan
Pakistani
to generate an XML File:
<employee>
<name> Imran Khan </name>
<nationality> Pakistani </nationality>
</employee>
Any suggestions?