How do I use this: SendReceiveTest1(); ?

  • Thread starter Thread starter trint
  • Start date Start date
T

trint

With this:
SendReceiveTest1();
I get this error:
error CS0118: 'System.Net.Sockets.Socket' denotes a 'class' where a
'variable' was expected

Here is the constructor:
public static int SendReceiveTest1(Socket server)
{

}

Thanks,
Trint
 
I see a couple problems with your sample, but maybe your code isn't exactly
what you posted here...

You call the method with no parameters but the method declaration has a
System.Net.Sockets.Socket parameter.

Also, you said that the SendReceiveTest1 method you showed is a constructor
but you have a return type of int. Constructors cannot have a return type.

It would be hard to tell exactly what is happening without clearing up those
issues first, whether they're just typographical or in fact exist in your
project.

HTH

DalePres
MCAD, MCDBA, MCSE
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top