I am currently connecting to a remote server via the UdpClient class to send and receive data. Everything is working fine, but I would like to be able to get the total time it takes to send and receive the information. What would be the most efficient and accurate way to do this?
Share
You should profile your application to get exact results. I would recommend dotTrace 4.5 Performance.
An alternative solution could be a Stopwatch, just like mvandersteen suggested, but in that case I would recommend a project developed by stackoverflow developers which can be found here: http://code.google.com/p/mvc-mini-profiler/ (assuming your application is an MVC 3 project).