开发者

defining asmx webservice class objects as static

is it better to declare Webservice class object instances as static 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 开发者_JAVA百科terms of performance?

Thanks

Usama


Actually there are no "static classes" .. there are static members (variables,methods). static class is sth of .net2.0 that forces every member to be static. and that's about it. In addition to the fact: "static" and "instance" are opposites - you can't instantiate a static class. – John Saunders Mar 11 at 3:18

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜