且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在没有返回任何值的情况下停止控制器

更新时间:2022-11-04 11:00:48

如果您可以更改方法签名,请将其设置为返回 void 而不是 int

另一方面,如果你不能更改方法签名然后替换

If you can change the method signature the make it return void instead of int.
On the other hand, if you can't change the method signature then replace
引用:

返回objBGServices.DispatcherTimerSetup(httpClient,lati,longi,UserId);

return objBGServices.DispatcherTimerSetup(httpClient, lati, longi, UserId);



with


with

objBGServices.DispatcherTimerSetup(httpClient, lati, longi, UserId);
return 0; // or whatever int value that makes sense