Українська · Русский · 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.