minmin

minmin

  • NA
  • 4
  • 0

How can I enforce users' input object type?

May 30 2008 2:58 AM

Say I have a class and  it contructor is public Protocol(Object port) and I would only allow user to pass in the System.IO.Ports.SerialPort or System.Net.Sockets.TcpClient only, other object types will consider error. How can I achieve this enforcement?

Please help!


Answers (2)