J
JSheble
Say I have two seperate timers in my app (it's strictly an example, I
don't really...) and each of the timer events calls the same method of the
form's class. Will these interfere with each other at all? Will they run
as if they're threaded?
Example:
private void timer1_Tick(object sender, System.EventArgs e)
{
this.SomeMethod()
}
private void timer2_Tick(object sender, System.EventArgs e)
{
this.SomeMethod()
}
private string SomeMethod()
{
OleDbCommand oDB = new OleDbCommand();
oDB.COnnection = new OleDbConnection(this.DSNString);
// do a bunch of other stuff
oDB.Connection.Close();
oDB.Dispose();
}
don't really...) and each of the timer events calls the same method of the
form's class. Will these interfere with each other at all? Will they run
as if they're threaded?
Example:
private void timer1_Tick(object sender, System.EventArgs e)
{
this.SomeMethod()
}
private void timer2_Tick(object sender, System.EventArgs e)
{
this.SomeMethod()
}
private string SomeMethod()
{
OleDbCommand oDB = new OleDbCommand();
oDB.COnnection = new OleDbConnection(this.DSNString);
// do a bunch of other stuff
oDB.Connection.Close();
oDB.Dispose();
}