[Mono-list] calling library functions

Andreas Färber andreas.faerber at web.de
Fri Jan 27 08:06:19 EST 2006


>> Declaration in library (mlibr.dll):        
>>
>>     public void SendData(string Data,string RemoteIP,ushort RemotePort)
>> {
>>     //
>> }
>>
>> Call in Main (Main.exe):
>>
>> object.Bind();  - compile ok
>> object.SendData(); - compile error
>>     
>
> Is that how you're actually invoking SendData()?  That doesn't match the
> above declaration; you'd instead need to call it like this:
>
> 	object.SendData ("data", "remote-ip", (ushort) remotePort);
>
>   
If it's C# it can't even be object.SendData(...)! ;-) (reserved word,
maps to System.Object which doesn't have a SendData method)
> If that's not it, it would help if you could provide more source code,
> narrowing it down to the smallest amount code necessary to generate the
> compiler error.
>   
Maybe it's a static vs. instance method problem? object is indeed not
very meaningful to determine such causes... could also be a typo
somewhere...

Andreas


More information about the Mono-list mailing list