Українська · Русский · 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 Learn。
There was an error while loading. Please reload this page.