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' –