Share via


IVsaCodeItem.SourceText 属性

设置或获取指定的代码项的文本,包括自动生成的代码(如果有)。

命名空间:  Microsoft.Vsa
程序集:  Microsoft.Vsa(在 Microsoft.Vsa.dll 中)

语法

声明
Property SourceText As String
string SourceText { get; set; }
property String^ SourceText {
    String^ get ();
    void set (String^ value);
}
abstract SourceText : string with get, set
function get SourceText () : String 
function set SourceText (value : String)

属性值

类型:String
返回代码项的源文本。

备注

当设置此属性时,不会对文本进行验证。 出于此原因,错误,如果有的话) 将出现在下一步 IVsaEngine.Compile 方法调用。

SourceText 属性返回一个大的字符串,其中包括格式设置字符 (回车符如中的源文本返回。

若要获取此属性在引擎必须不会关闭。 若要设置此属性,引擎必须不能关闭,且不得运行引擎。

请参阅

参考

IVsaCodeItem 接口

Microsoft.Vsa 命名空间