0
我在我的Mvc應用程序中有以下示例枚舉,我需要在Power-Shell中重新使用它。如何在PowerShell中重用C#枚舉?
namespace namespace_name
{
public enum test
{
sample1,
sample2
}
}
我需要在PowerShell中使用上面的枚舉。我遇到以下鏈接,https://social.technet.microsoft.com/wiki/contents/articles/26436.how-to-create-and-use-enums-in-powershell.aspx。
我不知道如何使用我們定義的枚舉,請提供一種在Power-Shell中使用它的方法。
進口的依賴,然後就可以使用完全合格的名稱來訪問它(例如, :'[namespace_name.test.sample1]')我認爲 – Icepickle
你是什麼意思「我不知道如何使用枚舉」?你鏈接的Technet文章甚至有一個例子。 –
@Icepickle差不多,'[namespace_name.test] :: sample1' –