I think the title might be wrong.. haha unsure.. anyway..
I have 3 different data types..
public class data1
{
public Color color;
public int len;
public DrawingVisual dv;
Other vars...
}
public class data2
{
public Color color;
public int len;
public DrawingVisual dv;
Other vars different from data1 vars...
}
Etc...
How can I create a function to pass these in and then get the vars I need inside the function.. Example..
void Something(var data)
{
switch (typeof(data))
{
case data1:
break;
case data1:
break;
}
}
This wont work obviously.. but its just an example..
How can I actually do this?
Thanks