Click here to Skip to main content
15,915,810 members
Home / Discussions / C#
   

C#

 
GeneralRe: Hi,I ask three question,it's about abnormity form,highlight keywords and linenumber. Pin
Dave Kreskowiak26-Mar-05 15:40
mveDave Kreskowiak26-Mar-05 15:40 
GeneralOR operator in Regular Expression Pin
Azel Low25-Mar-05 17:39
Azel Low25-Mar-05 17:39 
GeneralRe: OR operator in Regular Expression Pin
leppie25-Mar-05 23:04
leppie25-Mar-05 23:04 
GeneralRe: OR operator in Regular Expression Pin
Heath Stewart26-Mar-05 13:28
protectorHeath Stewart26-Mar-05 13:28 
GeneralA little push with Web Services. Pin
Anonymous25-Mar-05 15:40
Anonymous25-Mar-05 15:40 
GeneralRe: A little push with Web Services. Pin
turbochimp25-Mar-05 17:07
turbochimp25-Mar-05 17:07 
GeneralRe: A little push with Web Services. Pin
Anonymous26-Mar-05 0:51
Anonymous26-Mar-05 0:51 
GeneralRe: A little push with Web Services. Pin
wakkerjack31-Mar-05 1:41
wakkerjack31-Mar-05 1:41 
Generalopen window Pin
ABBASI_RA25-Mar-05 14:25
ABBASI_RA25-Mar-05 14:25 
GeneralRe: open window Pin
dabuskol25-Mar-05 19:37
dabuskol25-Mar-05 19:37 
GeneralRe: open window Pin
Heath Stewart26-Mar-05 13:15
protectorHeath Stewart26-Mar-05 13:15 
GeneralRe: open window Pin
dabuskol26-Mar-05 18:11
dabuskol26-Mar-05 18:11 
GeneralRe: open window Pin
Heath Stewart26-Mar-05 20:26
protectorHeath Stewart26-Mar-05 20:26 
GeneralCheck if a user have full access to a shared directory Pin
Johny Ng25-Mar-05 13:19
Johny Ng25-Mar-05 13:19 
GeneralRe: Check if a user have full access to a shared directory Pin
Heath Stewart26-Mar-05 13:13
protectorHeath Stewart26-Mar-05 13:13 
GeneralAccessing DotNet DLL from ASP Pin
Anand Chida25-Mar-05 10:05
Anand Chida25-Mar-05 10:05 
GeneralRe: Accessing DotNet DLL from ASP Pin
Heath Stewart25-Mar-05 11:48
protectorHeath Stewart25-Mar-05 11:48 
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]

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.