我试图将一些排入物体。 情况如下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Logging_default_path" value="C:Temp" />
<add key="Logging_max_file_size" value="10485760" />
<add key="Logging_levels" value="Error,Warning,Info"/>
<add key="Logging_filename" value="RobinsonLog" />
</appSettings>
</configuration>
The Logging_levels represents several enum values that are allowed by the settings. I m trying to load these into my object by using the following code:
Level = (LogLevel)Enum.Parse(typeof(LogLevel), settings["Logging_levels"]);
但是,这并不奏效,我只想达到后勤水平。 信息回来,而不是后勤水平的价值。 离职偿金。 预警数据。 信息。 表格的定义如下:
[Flags]
public enum LogLevel
{
Error = 0x0,
Warning = 0x1,
Info = 0x2,
Debug = 0x3,
Performance = 0x4
}
我错过了,用黑手法界定了价值观? 或者我是否对其他东西有误解?