Y
yootaeho
Hi,
I have an Object which has a list of list of objects.
For instance,
public class myClass
{
public List<FirstClass> myFirstClass {get;set;}
public List<SecondClass> mySecondClass {get;set;}
}
And both FirstClass and SecondClass have Id and Title properties.
Now I would like to create a function that takes a genetic list type
and then inside the function I would like to access Id and Title value
So something like this
public void myFunction (genetic variable)
{
// here I would like to access variable's Id and Title
}
myFunction(myClass.myFirstClass);
myFunction(myClass.mySecondClass);
Would you be able to help me to write the function me?
Thanks in advance,
Taeho
I have an Object which has a list of list of objects.
For instance,
public class myClass
{
public List<FirstClass> myFirstClass {get;set;}
public List<SecondClass> mySecondClass {get;set;}
}
And both FirstClass and SecondClass have Id and Title properties.
Now I would like to create a function that takes a genetic list type
and then inside the function I would like to access Id and Title value
So something like this
public void myFunction (genetic variable)
{
// here I would like to access variable's Id and Title
}
myFunction(myClass.myFirstClass);
myFunction(myClass.mySecondClass);
Would you be able to help me to write the function me?
Thanks in advance,
Taeho