ByteViewer.SetFile(String) 方法

定義

設定檔案在檢視器中顯示。

public:
 virtual void SetFile(System::String ^ path);
public virtual void SetFile(string path);
abstract member SetFile : string -> unit
override this.SetFile : string -> unit
Public Overridable Sub SetFile (path As String)

參數

path
String

要載入的檔案路徑。

例外狀況

pathnull

path 是空字串(“”),僅包含空白,或包含一個或多個無效字元。

指定的路徑無效,例如位於未對應的磁碟驅動器上。

檔案載入失敗了。

指定的路徑、檔名或兩者都超過系統定義的最大長度。

作業系統不允許對指定 path存取權限,例如當存取為 WriteReadWrite ,且檔案或目錄設定為唯讀存取時。

備註

檢視器會載入資料以從指定檔案觀看。 此方法若檔案載入失敗會拋出例外。

適用於