Esempio n. 1
0
 /// <summary>
 /// 判断版本是否处于版本范围,特殊版本的可以重载此方法
 /// </summary>
 /// <param name="version">当前版本</param>
 /// <param name="start">起始版本</param>
 /// <param name="end">结束版本,为空为不限制</param>
 /// <returns></returns>
 public bool IsInVersionRange(string version, string start, string end)
 {
     try
     {
         if (VersionUtil.Compare(version, start) == 1 && VersionUtil.Compare(version, end) <= 0)
         {
             return(true);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine("判断版本范围时出错:" + e.Message);
     }
     return(false);
 }