문제

I'm designing a cmdlet using plain C#. Is it possible to define a default value for a parameter?

Script cmdlet:

[Parameter] [string] $ParameterName = "defaultValue"

Which is the equivalent for C#?

[Parameter]
public string ParameterName { get; set; }

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top