VCCodeModel.CodeElementFromFullName Method
Gets a collection of the specified code elements for the object.
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
'إقرار
Function CodeElementFromFullName ( _
Name As String _
) As CodeElements
'الاستخدام
Dim instance As VCCodeModel
Dim Name As String
Dim returnValue As CodeElements
returnValue = instance.CodeElementFromFullName(Name)
CodeElements CodeElementFromFullName(
string Name
)
CodeElements^ CodeElementFromFullName(
[InAttribute] String^ Name
)
abstract CodeElementFromFullName :
Name:string -> CodeElements
function CodeElementFromFullName(
Name : String
) : CodeElements
- Name
Type: System.String
Required. The full name of the elements to retrieve.
Type: EnvDTE.CodeElements
A CodeElements collection.
This example adds a class and a function, retrieves a pointer to the function by using CodeElementFromFullName, and adds a parameter to it.
Sub AddFunction()
Dim vcCM As VCCodeModel
Dim vcClass As VCCodeClass
Dim vcFunction As VCCodeFunction
Dim vcParameter As VCCodeParameter
vcCM = DTE.Solution.Item(1).CodeModel
vcClass = vcCM.AddClass("MyClass", "MyClass.h")
vcClass.AddFunction("MyFunction", vsCMFunction.vsCMFunctionFunction, "int")
vcFunction = vcCM.CodeElementFromFullName("MyClass::MyFunction").Item(1)
vcParameter = vcFunction.AddParameter("MyParameter", "int")
End Sub
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.