开发者

beneficial in terms of performance

开发者 https://www.devze.com 2022-12-30 04:05 出处:网络
is it better to declare Webservice class object instances as stati开发者_开发技巧c as the .asmx webservice classes have only static methods.

is it better to declare Webservice class object instances as stati开发者_开发技巧c as the .asmx webservice classes have only static methods.

what i want is that i declare and instantiate webservice asmx class as static in aspx Page Behind Class.

and on every event call on that page i could perform operation against webservice methods.

is it beneficial in terms of performance?

Thanks

Usama


You should not use the static methods in the WebService, because it is a Disposable type, so then you use static class, it will cause some merory problems.

You should use only instances of the WebService class, and in the using expression

0

精彩评论

暂无评论...
验证码 换一张
取 消