Esempio n. 1
0
        public static FaqtypeInfo Parse(string stringify)
        {
            string[] ret = stringify.Split(new char[] { '|' }, 3, StringSplitOptions.None);
            if (ret.Length != 3)
            {
                throw new Exception("格式不正确,FaqtypeInfo:" + stringify);
            }
            FaqtypeInfo item = new FaqtypeInfo();

            if (string.Compare("null", ret[0]) != 0)
            {
                item.Id = uint.Parse(ret[0]);
            }
            if (string.Compare("null", ret[1]) != 0)
            {
                item.Sort = byte.Parse(ret[1]);
            }
            if (string.Compare("null", ret[2]) != 0)
            {
                item.Title = ret[2].Replace(StringifySplit, "|");
            }
            return(item);
        }
Esempio n. 2
0
 public static string ToJson(this FaqtypeInfo item)
 {
     return(string.Concat(item));
 }