Click here to Skip to main content
15,918,967 members
Home / Discussions / C#
   

C#

 
AnswerRe: Simple CSV Reader Class Pin
\laddie12-Mar-07 19:22
\laddie12-Mar-07 19:22 
GeneralRe: Simple CSV Reader Class Pin
thenamenoonehastaken12-Mar-07 19:48
thenamenoonehastaken12-Mar-07 19:48 
AnswerRe: Simple CSV Reader Class Pin
Niiiissssshhhhhuuuuu12-Mar-07 19:45
Niiiissssshhhhhuuuuu12-Mar-07 19:45 
Questionicons in GUI Pin
Keshav V. Kamat12-Mar-07 18:43
Keshav V. Kamat12-Mar-07 18:43 
AnswerRe: icons in GUI Pin
Keshav V. Kamat12-Mar-07 19:16
Keshav V. Kamat12-Mar-07 19:16 
Questionusing nonstatic function in thread Pin
EEmaan12-Mar-07 18:07
EEmaan12-Mar-07 18:07 
AnswerRe: using nonstatic function in thread Pin
mikker_12312-Mar-07 19:43
mikker_12312-Mar-07 19:43 
AnswerRe: using nonstatic function in thread Pin
Russell Jones12-Mar-07 22:52
Russell Jones12-Mar-07 22:52 
I want to see an example of threading in HTML Wink | ;-)

Seriously, though, there shouldn't be a difference between static and instance methods except that thread safety is normally easier to manage in static methods. I've used both techniques any they work great.

Damn, i just realised that you are in ASP.Net. Are static variables shared between instances and instance variables per instance? The code below is for winforms but i guess it's not going to help much.


public partial class Form1 : Form<br />
{<br />
   public Form1()<br />
   {<br />
      InitializeComponent();<br />
      TestingMethod();<br />
   }<br />
   private void TestingMethod()<br />
   {<br />
      myObject obj = new myObject();<br />
      Thread t = new Thread(new ThreadStart(obj.SlowMethod));<br />
      t.Start();<br />
   }<br />
}<br />
class myObject<br />
{<br />
   public void SlowMethod()<br />
   {<br />
      Thread.Sleep(10000);<br />
      Console.WriteLine("here");<br />
   }<br />
}


This code seems to work fine for me.

HTH

Russ
QuestionHow do you change the scrollbar position of a WebBrowser control? [modified] Pin
ThisIsMyUserName212-Mar-07 17:55
ThisIsMyUserName212-Mar-07 17:55 
AnswerRe: How do you change the scrollbar position of a WebBrowser control? Pin
ThisIsMyUserName212-Mar-07 23:46
ThisIsMyUserName212-Mar-07 23:46 
QuestionDisplaying Custom Collection Control Contents Pin
andymo212-Mar-07 17:37
andymo212-Mar-07 17:37 
AnswerRe: Displaying Custom Collection Control Contents Pin
mike montagne12-Mar-07 20:33
mike montagne12-Mar-07 20:33 
GeneralRe: Displaying Custom Collection Control Contents Pin
andymo213-Mar-07 2:21
andymo213-Mar-07 2:21 
GeneralRe: Displaying Custom Collection Control Contents Pin
mike montagne13-Mar-07 6:38
mike montagne13-Mar-07 6:38 
GeneralRe: Displaying Custom Collection Control Contents Pin
andymo214-Mar-07 10:41
andymo214-Mar-07 10:41 
GeneralRe: Displaying Custom Collection Control Contents Pin
mike montagne14-Mar-07 12:41
mike montagne14-Mar-07 12:41 
Questioncomputing the numeric value of 2 textbox without triggering with a button? (Windows Application) Pin
icesha12-Mar-07 16:13
icesha12-Mar-07 16:13 
AnswerRe: computing the numeric value of 2 textbox without triggering with a button? (Windows Application) Pin
rah_sin12-Mar-07 18:24
professionalrah_sin12-Mar-07 18:24 
GeneralRe: computing the numeric value of 2 textbox without triggering with a button? (Windows Application) Pin
PS@Codeproj12-Mar-07 19:44
PS@Codeproj12-Mar-07 19:44 
GeneralRe: computing the numeric value of 2 textbox without triggering with a button? (Windows Application) Pin
rah_sin12-Mar-07 20:06
professionalrah_sin12-Mar-07 20:06 
QuestionAnomalous behavior implementing the Dispose pattern? Pin
mike montagne12-Mar-07 15:49
mike montagne12-Mar-07 15:49 
QuestionQuestion on an error message Pin
JMOdom12-Mar-07 15:36
JMOdom12-Mar-07 15:36 
AnswerRe: Question on an error message Pin
rah_sin12-Mar-07 18:10
professionalrah_sin12-Mar-07 18:10 
QuestionCompressing files to multiple .zip's Pin
Ollie198612-Mar-07 13:16
Ollie198612-Mar-07 13:16 
AnswerRe: Compressing files to multiple .zip's Pin
Ollie198612-Mar-07 21:39
Ollie198612-Mar-07 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.