【发布时间】:2017-09-09 11:35:42
【问题描述】:
这是我的枚举:
public enum SomeTest
{
Undefined = 0,
Gram = 1,
Kilogram = 2
}
这是我的测试课:
private SomeTest test;
public Test (SomeTest test)
{
this.test = test;
}
我想设置为test 我的Settings.Default.Test 可以吗?
asd = new Test(Test)
【问题讨论】:
-
你的
Settings.Default.Test是什么? -
Properties.Settings.Default.Test => 类型是字符串
-
@TheNewBegining 您希望将
string分配给SomeTest的行为是什么?它们是不同的类型。