using System.ComponentModel; namespace Bloxstrap { static class Utilities { public static void ShellExecute(string website) { try { Process.Start(new ProcessStartInfo { FileName = website, UseShellExecute = true }); } catch (Win32Exception ex) { // lmfao if (!ex.Message.Contains("Application not found")) throw; Process.Start(new ProcessStartInfo { FileName = "rundll32.exe", Arguments = $"shell32,OpenAs_RunDLL {website}" }); } } /// /// /// /// /// /// /// Result of System.Version.CompareTo
/// -1: version1 < version2
/// 0: version1 == version2
/// 1: version1 > version2 ///
public static int CompareVersions(string versionStr1, string versionStr2) { var version1 = new Version(versionStr1.Replace("v", "")); var version2 = new Version(versionStr2.Replace("v", "")); return version1.CompareTo(version2); } } }