Trint,
The methods do not exist on the thread itself. Rather, the thread
provides an execution context for that method. You can call ANYTHING that
you want in the thread. You can call static members, or instance members.
For instance members, you have to have a reference to the instance somehow
(there are many ways to do this).
What you need to worry about is how calling properties/fields/methods
will be affected if two or more threads are trying to access it at the same
time. Take a look at the lock statement, as it will be your primary
mechanism for ensuring that you maintain the state of the objects you call
correctly.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"trint" <tr***********@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Ok,
If I have a process start in a thread other than the "main" of the
program, can that process call other functions that are not in its
thread without any problems? Or do I have to include those functions
in the same "thread" class?
example:
public class mythread
{
public static void thread
{
///do something here
///now call function in another class <-is this OK?
}
}
Thanks,
Trint