Response to: Passing a generic class to a non generic method
Revision 2
The generic class could inherit from a non-generic class.
public class NodeBase
{
public virtual void NodeMethod()
{
}
}
public class Note<t> : NodeBase
{
public override void NodeMethod()
{
}
}
Then you can hand it over to the method this way:
public class classname
{
public void SomeMethod( NodeBase node)
{
node.NodeMethod();
}
}
Posted 7-Dec-11 20:35pm
by
lukeer.