編碼方式不能設定為 Nothing

更新:2007 年 11 月

嘗試從檔案讀取或寫入檔案失敗,因為參數 encoding 已設為 Nothing,但是需要有效值。

Encoding 可用於判斷寫入檔案時要使用哪一種編碼方式。預設值為 UTF-8。

若要更正這個錯誤

  • 提供有效值給 encoding 參數。

請參閱

概念

檔案編碼方式

參考

My.Computer.FileSystem.ReadAllText 方法

My.Computer.FileSystem.WriteAllText 方法

其他資源

在 Visual Basic 中讀取檔案

在 Visual Basic 中寫入檔案