public static EvalueSettings EvalueSettings(EvalueViewEnum viewtype) { return(new EvalueSettings { ViewType = viewtype, }); }
public static EvalueViewEnum EvalueViewType(int typeNum) { var enumCount = EvalueViewEnum.GetNames(typeof(EvalueViewEnum)).Length; //last name is undefined so total possible types is enumCount-2 if (typeNum > enumCount - 2) { typeNum = 0; } EvalueViewEnum value = (EvalueViewEnum)typeNum; return(value); }