static int StringToVersion(string version) { int res; if (!int.TryParse(version.Replace(".", ""), out res)) res = 0; return res; }