Export (0) Print
Expand All
ID
Top
Expand Minimize

CodeModel Property (General Extensibility)

Visual Studio .NET 2003

Returns the CodeModel Object for the project.

[Visual Basic .NET]
Public ReadOnly Property CodeModel() As CodeModel
[Visual Basic 6]
Property Get CodeModel() As CodeModel
[C++]
HRESULT __stdcall get_CodeModel(
   /* [out, retval] */ CodeModel** retVal
);
[C#]
CodeModel CodeModel {get;}
[JScript .NET]
public function get CodeModel() : CodeModel

Return Value

Returns a CodeModel object.

Remarks

The CodeModel object gives you access to code elements or definitions in a source file.

Since CodeModel is most useful for Visual C++, other languages will find the FileCodeModel Property more suitable.

Example

Sub CodeModelExample()
   Dim vcCM As VCCodeModel
   Dim vcCodeElement As VCCodeElement
   vcCM = DTE.Solution.Item(1).CodeModel
   vcCodeElement = vcCM.AddFunction("MyFunction", "File.h", vsCMFunction.vsCMFunctionFunction, "void")
   MsgBox(vcCodeElement.DisplayName)
End Sub

See Also

FileCodeModel Property

Applies To: Project Object | VCCodeAttribute Object | VCCodeBase Object | VCCodeClass Object | VCCodeDelegate Object | VCCodeElement Object | VCCodeEnum Object | VCCodeEvent Object | VCCodeFunction Object | VCCodeIDLCoClass Object | VCCodeIDLImport Object | VCCodeIDLImportLib Object | VCCodeIDLLibrary Object | VCCodeImport Object | VCCodeInclude Object | VCCodeInterface Object | VCCodeMacro Object | VCCodeMap Object | VCCodeMapEntry Object | VCCodeNamespace Object | VCCodeParameter Object | VCCodeProperty Object | VCCodeStruct Object | VCCodeTypedef Object | VCCodeUnion Object | VCCodeUsing Object | VCCodeVariable Object

Show:
© 2014 Microsoft