Where is the X509Store supposedly implementing IDisposable in .NET 4.5?

This MSDN article article states that the X509Store class implements IDisposable in .NET 4.5. This was not in earlier versions of .NET.

Despite the fact that I have Windows 8.1, Visual Studio 2013, all versions of .Net, from 2.0 to 4.5.1, I can only see the X509Store , which looks like the version of .NET 4 in the latest version of System.dll (v4. 0.30319, aka.NET 4.5). VS Object Browser also shows that the X509Store in System.dll v4.0.30319 does not implement IDisposable , as stated in the MSDN article.

What am I missing and how do I get the X509Store from .NET 4.5? Is MSDN erroneous? This will not be the first time, but still. Is there an obscure fix for Windows Update?

+5
source share
1 answer

At first glance, MSDN seems to be talking about half the truth: Microsoft added the IDisposable interface to the X509Store class only in version 4.6, and not earlier. You can easily verify this using this really useful list of differences between versions 4.5.2 and 4.6: NET 4.5.2 vs 4.6 - System.Security.Cryptography.X509Certificates namespace .

But at the moment, the MSDN article has the following sentence in the Remarks section:

For applications targeting the .NET Framework 4.5.2 and earlier, the X509Store class does not implement the IDisposable interface and therefore does not have a Dispose method.

+3
source

Source: https://habr.com/ru/post/1208184/


All Articles