共用方式為


CoreWebView2Environment.CompareBrowserVersions(String, String) Method

Definition

Compares two instances of browser versions correctly and returns an integer that indicates whether the first instance is older, the same as, or newer than the second instance.

public static int CompareBrowserVersions (string version1, string version2);
static member CompareBrowserVersions : string * string -> int
Public Shared Function CompareBrowserVersions (version1 As String, version2 As String) As Integer

Parameters

version1
String

One of the version strings to compare.

version2
String

The other version string to compare.

Returns

An integer that indicates whether the first instance is older, the same as, or newer than the second instance.

Value TypeCondition
Less than zeroversion1 is older than version2.
Zeroversion1 is the same as version2.
Greater than zeroversion1 is newer than version2.

Applies to