M
MFRASER
How can I tell what object type is dropped onto my control? Here is a
snippet of code.
private void lvwTasks_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e)
{
//I want to know if e.Data is of type MyClass1 or MyClass2
Core.MyClass1 aTask = new MyClass1 ();
aTask = (Core.VariableMapping.MapXMLTask)e.Data.GetData(aTask.GetType());
Core.MyClass2 aTask2 = new MyClass2 ();
aTask2 = (Core.VariableMapping.MapXMLTask)e.Data.GetData(aTask2 .GetType());
}
snippet of code.
private void lvwTasks_DragDrop(object sender,
System.Windows.Forms.DragEventArgs e)
{
//I want to know if e.Data is of type MyClass1 or MyClass2
Core.MyClass1 aTask = new MyClass1 ();
aTask = (Core.VariableMapping.MapXMLTask)e.Data.GetData(aTask.GetType());
Core.MyClass2 aTask2 = new MyClass2 ();
aTask2 = (Core.VariableMapping.MapXMLTask)e.Data.GetData(aTask2 .GetType());
}