I want to use System.Collections.ArrayList
in my VBA script in Excel. Now I'm wondering: which .NET Framework version is required for that?
The reason I'm asking: on this site it explains the usage of that class and regarding a possible error message it strongly states (emphasis by me):
This is caused by not having the correct .Net Framework version installed. The correct version is 3.5. It doesn’t matter if you have a later version like 4.7, you must have 3.5 installed.
In contrary to that, Microsoft's offical documentation for ArrayList clearly lists quite a lot of .NET Framework versions under "Applies to".
Now, I clearly want to trust offical documentation more than a single webpage: as much as I googled, I haven't found another site confirming that restriction. But maybe it's just that 3.5 is the only version allowing the usage of that class in VBA.
So, please, can anyone tell me how to find out if I can use the ArrayList
(or any other .NET class for that matter, if a generalization could be made) with all of the versions listed in the docs — or is it really just v3.5?
Oh, and just in case that this is relevant: I know about and use late binding to avoid the references that you could add to an Excel workbook, to avoid problems with the version specific references.
Dim arrLst As Object
Set arrLst = CreateObject("System.Collections.ArrayList")