TextDocument.TryGetText(SourceText) 方法

定义

如果文档已加载且可用,请获取文档的当前文本。

public:
 bool TryGetText([Runtime::InteropServices::Out] Microsoft::CodeAnalysis::Text::SourceText ^ % text);
public bool TryGetText (out Microsoft.CodeAnalysis.Text.SourceText text);
public bool TryGetText (out Microsoft.CodeAnalysis.Text.SourceText? text);
member this.TryGetText : SourceText -> bool
Public Function TryGetText (ByRef text As SourceText) As Boolean

参数

text
SourceText

返回

适用于