Click here to Skip to main content
15,912,329 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to dispose a class Pin
Mircea Puiu8-Jan-07 3:39
Mircea Puiu8-Jan-07 3:39 
AnswerRe: How to dispose a class Pin
Guffa8-Jan-07 4:10
Guffa8-Jan-07 4:10 
GeneralRe: How to dispose a class Pin
Not Active8-Jan-07 4:15
mentorNot Active8-Jan-07 4:15 
GeneralRe: How to dispose a class Pin
Pete O'Hanlon9-Jan-07 3:33
mvePete O'Hanlon9-Jan-07 3:33 
GeneralRe: How to dispose a class Pin
Scott Dorman8-Jan-07 17:16
professionalScott Dorman8-Jan-07 17:16 
QuestionRowSource or Datasource in ComboBox Pin
phantanagu7-Jan-07 22:39
phantanagu7-Jan-07 22:39 
AnswerRe: RowSource or Datasource in ComboBox Pin
rizgar8-Jan-07 1:54
rizgar8-Jan-07 1:54 
QuestionHelp needed for Displaying Notification Icon Pin
Exelioindia7-Jan-07 22:37
Exelioindia7-Jan-07 22:37 
AnswerRe: Help needed for Displaying Notification Icon Pin
testy_proconsul7-Jan-07 23:18
testy_proconsul7-Jan-07 23:18 
GeneralRe: Help needed for Displaying Notification Icon Pin
Cormac M Redmond8-Jan-07 1:12
Cormac M Redmond8-Jan-07 1:12 
GeneralRe: Help needed for Displaying Notification Icon Pin
Exelioindia8-Jan-07 17:23
Exelioindia8-Jan-07 17:23 
AnswerRe: Help needed for Displaying Notification Icon Pin
Ravi Bhavnani8-Jan-07 2:50
professionalRavi Bhavnani8-Jan-07 2:50 
QuestionMultithreading Pin
indiaone7-Jan-07 21:21
indiaone7-Jan-07 21:21 
Basically What I want

In my program, two thread running.

Both thread taking method Name from Array and and executing.
Array containning Method Name List.
Only method name from the Array.

problem is when i m assigning like this i m getting error.

Error "strMN is a Variable but it's used like Method"

strMN getting value from the Array.

strMN is Variable Name.

Code :-

string[] strMName = strMethodName.ToString().Split(' ');
Console.WriteLine("Thread running");
for (int i = 0; i < strMName.Length; i++)
{
string strMN = strMName[i].ToString();

// create a thread for the Incrementer
Thread trdIncrementer = new Thread(new ThreadStart(strMN));
trdIncrementer.Start();

// create a thread for the Decrementer.
Thread trdDecrementer = new Thread(new ThreadStart(strMN));
trdDecrementer.Start();
}

Error "strMN is a Variable but it's used like Method"

Methods:-

///
/// demo function for Incrementer, counts up to 10.
///
public void Incrementer()
{
lock (trdIncrementer )
{
for (int counter = 0; counter < 10; counter++)
{
// assign the incrementer value and display the results
Console.WriteLine("Incrementer: {0}", counter);
}
}
}

///
/// demo function for Decrementer, counts down from 10.
///
public void Decrementer()
{
lock (trdDecrementer)
{
for (int counter = 10; counter >= 0; counter--)
{
// assign the decremented value and display the results
Console.WriteLine("Decrementer: {0}", counter);
}
}

}

help me out .

It's arrgent.

Thanks
AnswerRe: Multithreading [modified] Pin
Shajeel7-Jan-07 21:55
Shajeel7-Jan-07 21:55 
GeneralRe: Multithreading Pin
indiaone7-Jan-07 23:04
indiaone7-Jan-07 23:04 
GeneralRe: Multithreading Pin
Shajeel7-Jan-07 23:07
Shajeel7-Jan-07 23:07 
GeneralRe: Multithreading Pin
indiaone7-Jan-07 23:31
indiaone7-Jan-07 23:31 
GeneralRe: Multithreading Pin
Shajeel7-Jan-07 23:45
Shajeel7-Jan-07 23:45 
GeneralRe: Multithreading Pin
indiaone7-Jan-07 23:57
indiaone7-Jan-07 23:57 
GeneralRe: Multithreading Pin
Shajeel8-Jan-07 0:09
Shajeel8-Jan-07 0:09 
GeneralRe: Multithreading Pin
indiaone8-Jan-07 0:15
indiaone8-Jan-07 0:15 
GeneralRe: Multithreading Pin
Shajeel8-Jan-07 0:20
Shajeel8-Jan-07 0:20 
GeneralRe: Multithreading Pin
indiaone8-Jan-07 2:05
indiaone8-Jan-07 2:05 
GeneralRe: Multithreading Pin
Shajeel8-Jan-07 18:16
Shajeel8-Jan-07 18:16 
QuestionHow to access runtime methods of child form Pin
vaibhavnvag7-Jan-07 19:55
vaibhavnvag7-Jan-07 19:55 

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.