Click here to Skip to main content
15,881,877 members
Home / Discussions / C#
   

C#

 
GeneralUpdating table from datatable Pin
zuhx2-Feb-04 11:38
zuhx2-Feb-04 11:38 
GeneralRe: Updating table from datatable Pin
Heath Stewart2-Feb-04 12:01
protectorHeath Stewart2-Feb-04 12:01 
GeneralListView Pin
Gary Kirkham2-Feb-04 11:23
Gary Kirkham2-Feb-04 11:23 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 11:57
protectorHeath Stewart2-Feb-04 11:57 
GeneralRe: ListView Pin
Gary Kirkham2-Feb-04 12:02
Gary Kirkham2-Feb-04 12:02 
GeneralRe: ListView Pin
Heath Stewart2-Feb-04 12:06
protectorHeath Stewart2-Feb-04 12:06 
QuestionGood PDF Viewer control? Pin
Alex Korchemniy2-Feb-04 11:04
Alex Korchemniy2-Feb-04 11:04 
GeneralCOM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:26
KingTermite2-Feb-04 10:26 
I have a C# com object that I'm creating which I'm testing in a VB environment. This COM object is also calling other COM objects which were written in VB.

I have a VB COM object with a method who's signature looks like this:
Public Function MyFunction(varNames() As String) As String()

I'm trying to send in a string array when calling this guy in my C# code like this:

string[] sNames = { "ProjectName" }; // 1 element array<br />
COMInt.ComClass oCDS = new COMInt.ComClass();<br />
<br />
sValues = oCDS.MyFunction(ref sNames);

I get type mismatch on the "ref sNames". This is just one of many combinations I've tried, but have not quite figured out the correct type match.

Here is the error I receive in VS.Net:
D:\CSS\Dev\ProjName\ProjClass.cs(255): The best overloaded method match for 'COMInt.ComClass.MyFunction(ref System.Array)' has some invalid arguments

Can anybody help me out and explain this?

P.S. Sorry for all the "MyFunction" and "ProjClass", etc.... but this is at work and I could get in trouble just for posting the names of things (they are VERY picky).


There are only 10 types of people in this world....those that understand binary, and those that do not.
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 10:29
protectorHeath Stewart2-Feb-04 10:29 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 10:59
KingTermite2-Feb-04 10:59 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:01
protectorHeath Stewart2-Feb-04 11:01 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:09
KingTermite2-Feb-04 11:09 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:14
protectorHeath Stewart2-Feb-04 11:14 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite2-Feb-04 11:40
KingTermite2-Feb-04 11:40 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart2-Feb-04 11:49
protectorHeath Stewart2-Feb-04 11:49 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 3:24
KingTermite3-Feb-04 3:24 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 3:44
protectorHeath Stewart3-Feb-04 3:44 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 4:04
KingTermite3-Feb-04 4:04 
GeneralRe: COM/C# datatype mismatch Pin
Heath Stewart3-Feb-04 4:26
protectorHeath Stewart3-Feb-04 4:26 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite3-Feb-04 4:40
KingTermite3-Feb-04 4:40 
GeneralRe: COM/C# datatype mismatch Pin
KingTermite4-Feb-04 7:28
KingTermite4-Feb-04 7:28 
GeneralCalling a .NET Component from a COM Component Pin
Shahin772-Feb-04 9:11
Shahin772-Feb-04 9:11 
GeneralRe: Calling a .NET Component from a COM Component Pin
Heath Stewart2-Feb-04 9:57
protectorHeath Stewart2-Feb-04 9:57 
GeneralRe: Calling a .NET Component from a COM Component Pin
Shahin772-Feb-04 11:12
Shahin772-Feb-04 11:12 
GeneralRe: Calling a .NET Component from a COM Component Pin
Heath Stewart2-Feb-04 11:45
protectorHeath Stewart2-Feb-04 11:45 

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.