Hi

 I have the following values in my csv file

 firstName,LastName,age
 Jim,Morrison,40
 Pat,King,25

Now let's say I want to use the CsvData attribute this way:

public class PersonTest
{
     private Person p;

     [CsvData(FilePath = "Persons.csv", HasHeader = true)]
     public PersonTest( string fName, string lName, int age )
     {
          p = new Person(fName,lName,age);
     }
}

I've noticed that it is not possible to use le CsvData attribute at
the constructor level, the only way of achieving this is with the
following :

   public PersonTest( [CsvData(FilePath = "Persons.csv", HasHeader =
true)] string fName, string lName, int age )

My question is how can I get the lName and age value if I only put the
CsvData attribute only on the first parameter ?

Thanx
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to