Skip to content

Commit 6fd7ec7

Browse files
committed
Resolve a build error in OdbcConnection caused by new Parse APIs
1 parent 1e405a3 commit 6fd7ec7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/libraries/System.Data.Odbc/src/System/Data/Odbc/OdbcConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ internal bool IsV3Driver
223223
{
224224
try
225225
{ // mdac 89269: driver may return malformatted string
226-
ProviderInfo.IsV3Driver = (int.Parse(ProviderInfo.DriverVersion.Substring(0, 2), CultureInfo.InvariantCulture) >= 3);
226+
ProviderInfo.IsV3Driver = (int.Parse(ProviderInfo.DriverVersion.AsSpan(0, 2), CultureInfo.InvariantCulture) >= 3);
227227
}
228228
catch (System.FormatException e)
229229
{

0 commit comments

Comments
 (0)