سؤال

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