Repository navigation
CSharp Directive Load
Codex edited this page Oct 11, 2026
·
2 revisions
Українська · Русский · English · Deutsch · Français · Italiano · Español · 繁體中文 · 日本語 · 한국어
Довідник C# · Практичне керівництво
Скриптова директива завантажує інший .csx файл. Для звичайного проєкту використовуйте Compile або ProjectReference.
Збережіть цей приклад окремо як Example.csx. Запускайте його незалежно від інших прикладів на сторінці.
Example.csx:
#load "helper.csx"
UO.Print(Double(4).ToString());helper.csx:
int Double(int value) => value * 2;Результат:
8
#load "helper.csx"#load "helper.csx"
UO.Print(Double(4).ToString());Файл helper.csx:
int Double(int value) => value * 2;#load "settings.csx"
UO.Print($"{ProfileName}:{Limit}");Файл settings.csx:
string ProfileName = "Archer";
int Limit = 3;Офіційне джерело: Microsoft Learn.
ClassicUO — Bad Newbie & C# Scripts IDE