예제 #1
0
    static void SetField(object section, FieldInfo fieldInfo, string valueStr)
    {
        Type type = fieldInfo.FieldType;

        if (type.IsArray || typeof(IList).IsAssignableFrom(type))
        {
            valueStr = TrimSpace(valueStr, "[", "]");
        }
        Formatter.AssignObject(section, fieldInfo, valueStr);
    }