How to find the C# component that contains a particular class
I'm creating an Internet Explorer plugin using C#. I've been following a tutorial where the code imports a couple of classes that I don't have available, namely:
using System.Windows;
using SHDocVw;
I realise I need to add the relevant components to my project but I'm not sure how to find the components that c开发者_如何学JAVAontain the classes. Perhaps there is a search somewhere?
Both of those examples are Namespaces that are located in assemblies that need to be reference. Luckily, adding those references are quite simple:
For System.Windows:
- Right click your project.
- Select "Add Reference..."
- Select the ".NET" tab and find the System.Windows assembly.
- Double click to add.
For SHDocVw:
- Right click your project.
- Select "Add Reference..."
- Select the "Browse" tab.
- Navigate to C:\Windows\System32
- Find SHDocVw.dll
- Double click to add.
First of all the code you posted are not class but namespaces.
You can fidn what component to add by looking on the documentaion of the namespace. Google after the namespace name and you will fidn the answer on MSDN.
its Microsoft Web Browser Control.
You should have it on your PC with name of
shdocvw32.dll
Reference it with your project.
Regards,
Mazhar Karimi
精彩评论