示例#1
0
        protected T EnterProperty <T>(string propertyName)
        {
            Console.Clear();
            Console.Write("{0} : ", propertyName);
            var input = Console.ReadLine();

            _uiConsole.DisplayHelp();
            var converter = TypeDescriptor.GetConverter(typeof(T));

            if (converter != null)
            {
                return((T)converter.ConvertFromString(input));
            }
            return(default(T));
        }