From this article about the SharpShell project, it looks like with it you would use the SelectedItemPaths
property. Windows Shell Extensions in .NET says:
The purpose of the Initialize method is to get information about the selected items in the shell and save that information for later calls. The m_dataObject and m_hDrop fields are used to store this information in the COM object between calls.
(emphasis added)
But conventional wisdom and guidance is that you shouldn't, in general, write shell extensions in managed code.
Microsoft recommends against writing managed in-process extensions to Windows Explorer or Windows Internet Explorer and does not consider them a supported scenario.
(emphasis theirs)
They do give some examples where it is OK.