ContextNodeBaseCollection.Add Method
Adds a ContextNodeBase object to the ContextNodeBaseCollection.
Namespace: System.Windows.Ink.AnalysisCore
Assembly: IACore (in IACore.dll)
Syntax
'Declaration
Public Function Add ( _
nodeToAdd As ContextNodeBase _
) As Integer
'Usage
Dim instance As ContextNodeBaseCollection
Dim nodeToAdd As ContextNodeBase
Dim returnValue As Integer
returnValue = instance.Add(nodeToAdd)
public int Add(
ContextNodeBase nodeToAdd
)
public:
int Add(
ContextNodeBase^ nodeToAdd
)
public function Add(
nodeToAdd : ContextNodeBase
) : int
Parameters
nodeToAdd
Type: System.Windows.Ink.AnalysisCore.ContextNodeBaseThe ContextNodeBase object to add to the ContextNodeBaseCollection.
Return Value
Type: System.Int32
The index at which the ContextNodeBase is added. If the nodeToAdd already exists in the collection, Add returns the index of its position in the collection. If Add cannot add the ContextNodeBase, it returns -1.
Examples
The following example creates a new ContextNodeBase of type Paragraph from an InkAnalyzerBase, theInkAnalyzerBase, and adds it to the ContextNodeBaseCollection, named nodes.
Dim paragraph As ContextNodeBase = _
theInkAnalyzerBase.RootNode.CreateSubNode(System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Paragraph)
nodes.Add(paragraph)
ContextNodeBase paragraph = theInkAnalyzer.RootNode.CreateSubNode(System.Windows.Ink.AnalysisCore.ContextNodeTypeBase.Paragraph);
nodes.Add(paragraph);
Platforms
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information
.NET Framework
Supported in: 3.0
See Also
Reference
ContextNodeBaseCollection Class