public static ReleaseVersion FromSection(ConfigSection section) { Version ver; try { ver = new Version(section.SubSection); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); return null; } var version = new ReleaseVersion() { Version = ver, ReleaseType = ReleaseType.Major, DownloadPage = section.GetValue("DownloadPage") }; Enum.TryParse<ReleaseType>(section.GetValue("ReleaseType"), true, out version.ReleaseType); return version; }