Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
使用手冊C# · 實用指南
腳本指令載入另一個 .csx 檔案。對於常規項目,請使用編譯或ProjectReference。
請將此範例另存為 Example.csx,並與本頁其他範例分開執行。
Example.csx
Example.csx:
#load "helper.csx" UO.Print(Double(4).ToString());
helper.csx:
helper.csx
int Double(int value) => value * 2;
結果:
8
#load "helper.csx"
文件helper.csx:
#load "settings.csx" UO.Print($"{ProfileName}:{Limit}");
文件settings.csx:
settings.csx
string ProfileName = "Archer"; int Limit = 3;
官方來源:Microsoft學習。
There was an error while loading. Please reload this page.