Export (0) Print
Expand All

VCFileCodeModel Interface 

An object representing the code elements in a source file.

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("DF69B061-2447-11D7-8BF6-00B0D03DAA06")] 
public interface VCFileCodeModel : FileCodeModel2
/** @attribute GuidAttribute("DF69B061-2447-11D7-8BF6-00B0D03DAA06") */ 
public interface VCFileCodeModel extends FileCodeModel2
GuidAttribute("DF69B061-2447-11D7-8BF6-00B0D03DAA06") 
public interface VCFileCodeModel extends FileCodeModel2

The VCFileCodeModel object is used to modify an existing source file and the code elements contained within.

NoteNote

A large part of the functionality of this object is provided by the Visual Studio FileCodeModel object. For more information, see FileCodeModel object.

See Samples for Code Model Extensibility for information on how to compile and run this sample.

This example retrieves the VCFileCodeModel for the first project item of the current solution. It assumes a default MFC project is open.

Sub GetSourceFile()
    Dim vcFile as VCFileCodeModel
    Dim project as Project
    project = DTE.Solution.Item(1)
    vcFile = project.ProjectItems.Item(1).FileCodeModel
End Sub
Show:
© 2015 Microsoft