E
Eric Wenger
I'm pretty new to C# and I'm trying to do what I believe should be a
simple thing. I want to modify a program that is using the
System.Net.NetworkInformation.Ping class to have some custom behavior.
For example I would like to do a "TCP-ping" where I try to connect to a
TCP port on a remote machine. It seems obvious to me that I should try
to derive a new Ping class (TCPPing) from the existing class so that I
can use its interfaces.
Unfortunately for me, the PingReply class (returned by Ping.Send())
does not have a constructor and has no settable properties. It seems
like I would have to go into "unsafe" code land to figure out what's
inside but I can't do that either.
Is there a solution to this or do I need to try a different approach?
simple thing. I want to modify a program that is using the
System.Net.NetworkInformation.Ping class to have some custom behavior.
For example I would like to do a "TCP-ping" where I try to connect to a
TCP port on a remote machine. It seems obvious to me that I should try
to derive a new Ping class (TCPPing) from the existing class so that I
can use its interfaces.
Unfortunately for me, the PingReply class (returned by Ping.Send())
does not have a constructor and has no settable properties. It seems
like I would have to go into "unsafe" code land to figure out what's
inside but I can't do that either.
Is there a solution to this or do I need to try a different approach?