namespace DeviceRepairAndOptimization.Common
{
    public static class StringExtended
    {
        /// <summary>
        /// 判断字符串是否为空
        /// </summary>
        /// <param name="Value"></param>
        /// <returns></returns>
        public static bool IsNullOrWhiteSpace(this string Value)
        {
            if (!string.IsNullOrWhiteSpace(Value))
                return false;
            return true;
        }

        /// <summary>
        /// 判断字符串是否为整数型
        /// </summary>
        /// <param name="Value"></param>
        /// <returns></returns>
        public static bool IsInt(this string Value)
        {
            int intValue = 0;
            if (!string.IsNullOrWhiteSpace(Value))
                return false;
            return int.TryParse(Value, out intValue);
        }
    }
}
