Posted on: 2/22/2015 2:42:39 PM | Views : 529

Hi. I am in a situation where i need to fill class object properties dynamically. ignore syntax and other errors.
public class Customer{
 string name;
string addr1;
}
public class Account: Customer
{
string acctno;
}
public class Salary: Customer
{
decimal salary;
}
------
I have many classes like these where i use base class for all classes. I can add Customer cust object for all classes. But I am serialising classes as xml with nodes. I already created fn and its generating xml.
I want a function which fills values dynamically. Customer name and addr1 must be used for all classes. so in a function i want like
eg:
function test(object obj){
obj.acctno = "111"
obj.name = "ttt"
obj.addr1 = "Adres1"
return obj;
}
How can I pass Account class and Salary class and other ...

Go to the complete details ...