i have create a web service using visual studio 2010, the web service receives 2 integers and the stopwach, one of the parameter also includes and out statement just as show in the nex example:
public double[][] Parameters(int N_ele, int N_carac, Stopwatch inic, out Stopwatch ini_final)
wen i create a web aplication in visual studio a have to create a web reference in order to call the web service. When i call the web service i used the next code:
webclient.Serv1 service = new webclient.Serv1();
int element, caracteristic;
System.Diagnostics.Stopwatch time_sent = new System.Diagnostics.Stopwatch();
System.Diagnostics.Stopwatch time_respond = new System.Diagnostics.Stopwatch();
servicie.Parameters(ele, caract,time_sent, out time_respond);
how ever visual studio marks and error it says: cannot convert System.Diagnostics.Stopwatch to Application1.webclient.Serv1.Stopwatch
and also the same error in the out statement, if some can help me to find the reason of the error and how to solve it. also i am using the C#, visual studio, .NET framework 4 and 3, using two different web application.
You are dealing with two classes that are both named
Stopwatch. One is in theSystem.Diagnosticsnamespace, and the other is in theApplication1.webclient.Serv1namespace. Make sure that all of yourStopwatchinstances are the same type ofStopwatch.