Click here to Skip to main content
15,901,505 members
Home / Discussions / C#
   

C#

 
GeneralNew WebBrowser Pin
thedjhacker25-Mar-05 8:09
thedjhacker25-Mar-05 8:09 
GeneralRe: New WebBrowser Pin
Heath Stewart25-Mar-05 11:39
protectorHeath Stewart25-Mar-05 11:39 
GeneralRe: New WebBrowser Pin
thedjhacker25-Mar-05 12:38
thedjhacker25-Mar-05 12:38 
GeneralPhoto Printing Wizard Pin
tommazzo25-Mar-05 6:02
tommazzo25-Mar-05 6:02 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 7:30
mveDave Kreskowiak25-Mar-05 7:30 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 11:15
tommazzo25-Mar-05 11:15 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 11:45
mveDave Kreskowiak25-Mar-05 11:45 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:10
protectorHeath Stewart25-Mar-05 12:10 
vector in your code is actually an object. In order to call the Add method you must do so with vector cast to the correct type. Inheritence rules do not mean that you can call a method on an object that does not actually define that method, and System.Object (or simply object in C#) does not define an Add method so the compiler is correct.

Dave's suggestion will work, but you can also use reflection to get the MethodInfo for the Add method and invoke it:
Type vectorType = Type.GetType("WIA.Vector, Interop.WIA");
object vector = Activator.CreateInstance(vectorType);
MethodInfo addMethod = vectorType.GetMethod("Add");
if (addMethod != null)
  addMethod.Invoke(vector, new object[] {p.Path, 0});


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 12:35
tommazzo25-Mar-05 12:35 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:58
protectorHeath Stewart25-Mar-05 12:58 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 12:37
tommazzo25-Mar-05 12:37 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 12:55
protectorHeath Stewart25-Mar-05 12:55 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 13:11
tommazzo25-Mar-05 13:11 
GeneralRe: Photo Printing Wizard Pin
Dave Kreskowiak25-Mar-05 13:42
mveDave Kreskowiak25-Mar-05 13:42 
GeneralRe: Photo Printing Wizard Pin
tommazzo25-Mar-05 13:52
tommazzo25-Mar-05 13:52 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart25-Mar-05 14:21
protectorHeath Stewart25-Mar-05 14:21 
GeneralRe: Photo Printing Wizard Pin
tommazzo26-Mar-05 7:36
tommazzo26-Mar-05 7:36 
GeneralRe: Photo Printing Wizard Pin
Heath Stewart26-Mar-05 8:16
protectorHeath Stewart26-Mar-05 8:16 
Generaltypeof versus Type.GetType() Pin
Member 9625-Mar-05 5:50
Member 9625-Mar-05 5:50 
GeneralRe: typeof versus Type.GetType() Pin
Heath Stewart25-Mar-05 11:34
protectorHeath Stewart25-Mar-05 11:34 
GeneralRe: typeof versus Type.GetType() Pin
Member 9625-Mar-05 13:59
Member 9625-Mar-05 13:59 
GeneralRe: typeof versus Type.GetType() Pin
Heath Stewart25-Mar-05 14:31
protectorHeath Stewart25-Mar-05 14:31 
GeneralRe: typeof versus Type.GetType() Pin
Tom Larsen25-Mar-05 12:21
Tom Larsen25-Mar-05 12:21 
GeneralRe: typeof versus Type.GetType() Pin
Heath Stewart25-Mar-05 14:28
protectorHeath Stewart25-Mar-05 14:28 
GeneralRe: typeof versus Type.GetType() Pin
Member 9625-Mar-05 16:39
Member 9625-Mar-05 16:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.