Exemplo n.º 1
0
 /// <summary>
 /// Tries the parse.
 /// </summary>
 /// <param name="s">The s.</param>
 /// <param name="version">The version.</param>
 /// <returns>True if the parse succeeds</returns>
 public static bool TryParse(string s, out DtoVersion version)
 {
     try
     {
         version = VersionHelpers.ParseVersionString(s);
         return(true);
     }
     catch (Exception)
     {
         version = null;
         return(false);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Parses the specified version.
 /// </summary>
 /// <param name="s">The string version.</param>
 /// <returns>
 /// The <see cref="Version" />
 /// </returns>
 public static DtoVersion Parse(string s)
 {
     return(VersionHelpers.ParseVersionString(s));
 }