Reputation: 73
I am trying to pass the AVLTree object reference to another method.
Definition of AVLTree class => class AVLTree : IComparable> where T : IComparable
Code
Addhere(ref AVLTree<T> currentNode); //Passing like this
public void Addhere(ref AVLTree<T> currentNode) //Receiving like this
{
}
Error is => "using the generic type AVLTree(T) requires 1 argument"
Upvotes: 0
Views: 49
Reputation: 2422
You need to declare it outside and pass
AVLTree<T> currentnode = null;
Addhere(ref currentnode);
Upvotes: 1