Пример #1
0
        /// <summary>
        /// Reads a value from the console using a <see cref="ValueView{T}"/> with default configuration.
        /// </summary>
        /// <param name="label">The label text to be displayed.</param>
        /// <param name="value">The value to be displayed.</param>
        /// <returns>The value read from the console.</returns>
        public static void QuickWrite(string label, T value)
        {
            ValueView <T> valueView = new ValueView <T>(label)
            {
                Value = value
            };

            valueView.Write();
        }
Пример #2
0
        /// <summary>
        /// Reads a value from the console using a <see cref="ValueView{T}"/> with default configuration.
        /// </summary>
        /// <param name="label">The label text to be displayed.</param>
        /// <returns>The value read from the console.</returns>
        public static T QuickRead(string label)
        {
            ValueView <T> valueView = new ValueView <T>(label);

            return(valueView.Read());
        }