* remove unused local
issue dotnet#30457
remove unused local variable fullPath at line 415
* Update src/libraries/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
Co-authored-by: Kevin Gosse <krix33@gmail.com>
Co-authored-by: Kevin Gosse <krix33@gmail.com>
// .NET Framework compat: The .NET Framework expands the filename to a full path for the purpose of performing a CAS permission check. While CAS is not present here,
// we still need to call GetFullPath() so we get the same exception behavior if the fileName is bad.
- string fullPath = Path.GetFullPath(fileName);
+ _ = Path.GetFullPath(fileName);
return X509Pal.Instance.GetCertContentType(fileName);
}