|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
What are the implecations of using static functions in a ASP.NET application ? and what are the best practices of doing so ?
1. Is acess to static functions synchronized in a ASP.NET app. i.e. How are multiple requests handeled ? 2. Why should we use static functions, is there an advantage other than the lesser cost of instantiating an object of the type in which that function resides? For example public class X { public static a() { some_variable i; create_object Z(); // do something } public static c() { Y y = new Y(); y.b(); } } public class Y() { public b() { X.a(); } } 3. What happens when I get multiple requests to access X.a() from Y.b() ? Will it be a performance problem ? Will variables created in a static function by one request get overridden by another ? 4. Should static functions only call other static functions? is what I have done in X.c() valid ? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > implecations of using static functions in a ASP.NET application |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|