What is the correct way to call an extension method (TreeNodeCollection Add method)?
问题 The pertinent parts of my code are below. In the MyTreeView class (last block of code below), the line of code TncExtensions.TncNodeAdd(this, myTreeViewNode); generates the error CS7036 There is no argument given that corresponds to the required formal parameter 'myTreeViewNode' of 'TncExtensions.TncNodeAdd(TreeNodeCollection, MyTreeView_Abstract, MyTreeViewNode_Abstract)' Why can't the compiler figure out what the 2nd formal parameter is for my TreeNodeCollection extension method? public