DataViewHierarchyAccessor.ActivateDocumentIfOpen 方法 (String)
如果文件已開啟,則是以指定的 Moniker 的文件。
命名空間: Microsoft.VisualStudio.Data
組件: Microsoft.VisualStudio.Data (在 Microsoft.VisualStudio.Data.dll 中)
語法
'宣告
Public Function ActivateDocumentIfOpen ( _
documentMoniker As String _
) As Boolean
public bool ActivateDocumentIfOpen(
string documentMoniker
)
public:
bool ActivateDocumentIfOpen(
String^ documentMoniker
)
member ActivateDocumentIfOpen :
documentMoniker:string -> bool
public function ActivateDocumentIfOpen(
documentMoniker : String
) : boolean
參數
documentMoniker
類型:String文件的 Moniker 可以啟動。
傳回值
類型:Boolean
如果文件已開啟,則會傳回 true ;否則會傳回 false。
例外狀況
例外狀況 | 條件 |
---|---|
ArgumentNullException | documentMoniker 參數為 null。 |
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。