Concurrency Issues?

Apr 28 2004 12:23 PM
Are local variables defined with in a static method or returned objects from a static method "global" in nature? I've written a bunch of static methods in various classes, I don't use any static class members defined outside the method defined in the class itself. What I'm concerned with is concurrency issues, with respect to someone else getting someone else's data. So for example, if user A is using the program, and the program calls static method foo, and then user B who's also using the program, and the program calls static method foo at the same time, is there any chance that user A might get user's B data? Some of the static methods return objects. For example public static ArrayList foo(string[] sArray) { string s = null; ArrayList al = new ArrayList(); execute stored procedure(sArray); s = stored procedure results; al.Add(s); return al; }

Answers (1)