opsb
opsb

Reputation: 30211

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 contain the classes. Perhaps there is a search somewhere?

Upvotes: 1

Views: 2170

Answers (3)

Justin Niessner
Justin Niessner

Reputation: 245389

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:

  1. Right click your project.
  2. Select "Add Reference..."
  3. Select the ".NET" tab and find the System.Windows assembly.
  4. Double click to add.

For SHDocVw:

  1. Right click your project.
  2. Select "Add Reference..."
  3. Select the "Browse" tab.
  4. Navigate to C:\Windows\System32
  5. Find SHDocVw.dll
  6. Double click to add.

Upvotes: 2

Mazhar Karimi
Mazhar Karimi

Reputation:

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

Upvotes: 1

Liviu Mandras
Liviu Mandras

Reputation: 6607

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.

Upvotes: 1

Related Questions