Y
Y
yraiv2022-04-15 17:03:41
C++ / C#
yraiv, 2022-04-15 17:03:41

How to pass the value of a variable to another class?

Is it possible to somehow pass data for the thread I'm running without resorting to standard methods? I mean, what would I just pass in brackets? Here I have some variable i (int). In each thread, it should be +1 more than the previous one, even if it is set manually for now, how can this be implemented?

Thread BeginBrauzer1 = new Thread(LoadBrauzer1);
            Thread BeginBrauzer2 = new Thread(LoadBrauzer2);
            BeginBrauzer1.Start();
            BeginBrauzer2.Start();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2022-04-15
@freeExec

What is the difficulty of opening the documentation and reading
public void Start(object parameter)
Oh yes, you want crutches, not standard methods.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question