Click here to Skip to main content
15,913,944 members
Home / Discussions / C#
   

C#

 
QuestionTooltip does not show up Pin
smurfy3412-Apr-06 7:35
smurfy3412-Apr-06 7:35 
AnswerRe: Tooltip does not show up Pin
Manas Bhardwaj12-Apr-06 23:15
professionalManas Bhardwaj12-Apr-06 23:15 
GeneralRe: Tooltip does not show up Pin
smurfy3414-Apr-06 4:19
smurfy3414-Apr-06 4:19 
AnswerRe: Tooltip does not show up Pin
lvanerstrom14-Apr-06 8:18
lvanerstrom14-Apr-06 8:18 
GeneralRe: Tooltip does not show up Pin
smurfy3414-Apr-06 9:14
smurfy3414-Apr-06 9:14 
QuestionSynchronization thread help? Pin
eric_tran12-Apr-06 7:28
eric_tran12-Apr-06 7:28 
AnswerRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 7:43
sponsorJudah Gabriel Himango12-Apr-06 7:43 
GeneralRe: Synchronization thread help? Pin
eric_tran12-Apr-06 8:11
eric_tran12-Apr-06 8:11 
Please help this. There are 2 errors down


using System;<br />
using System.Threading;<br />
using System.Collections;<br />
namespace ConsoleApplication2<br />
{<br />
	class Program<br />
<br />
	{<br />
		static object lockObject;<br />
<br />
		static void Main(string[] args)<br />
<br />
		{	 <br />
<br />
<br />
			ArrayList space = new ArrayList();	<br />
<br />
			for (int i = 1; i <= 10  ; i++)<br />
			{<br />
				space.Add(i);<br />
			 <br />
			}		<br />
<br />
			lockObject = new object();				 <br />
			 <br />
<br />
//error			Thread t1 = new Thread(new ParameterisedThreadStart(AccessData));		//error 	 	t1.Start(space);<br />
<br />
			Thread.Sleep(20*1000);<br />
<br />
		}<br />
<br />
	 <br />
		<br />
		public static void AccessData(object param)<br />
		{<br />
//			Thread.CurrentThread.IsBackground = true;<br />
			 <br />
			ArrayList list = (ArrayList)param;<br />
					<br />
			lock (lockObject)<br />
			{<br />
				Random rand = new Random();<br />
		<br />
				int x = rand.Next(list.Count);<br />
				list.Remove(x);<br />
				Console.WriteLine("x = " + x);<br />
						<br />
				int y = rand.Next(list.Count);<br />
				list.Remove(y);<br />
				Console.WriteLine("y = " + y);<br />
		<br />
				int newNumber = x + y;<br />
				Console.WriteLine("newNumber = " + newNumber);<br />
		<br />
				list.Add(newNumber);<br />
		<br />
		<br />
		<br />
				foreach (int inte in list)<br />
					Console.WriteLine(inte);<br />
		<br />
			}<br />
						<br />
		 <br />
		 <br />
		}<br />
			<br />
	}<br />
}<br />


eric
GeneralRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 8:25
sponsorJudah Gabriel Himango12-Apr-06 8:25 
GeneralRe: Synchronization thread help? Pin
eric_tran12-Apr-06 8:29
eric_tran12-Apr-06 8:29 
GeneralRe: Synchronization thread help? Pin
Judah Gabriel Himango12-Apr-06 9:07
sponsorJudah Gabriel Himango12-Apr-06 9:07 
QuestionHelp required for Hiding in Wav Format Pin
nwr_mn12-Apr-06 7:23
nwr_mn12-Apr-06 7:23 
AnswerRe: Help required for Hiding in Wav Format Pin
Corinna John12-Apr-06 21:25
Corinna John12-Apr-06 21:25 
QuestionHow to encrypt XML file Pin
engsrini12-Apr-06 7:15
engsrini12-Apr-06 7:15 
QuestionHow do I enter a field with the entry selected Pin
smurfy3412-Apr-06 6:24
smurfy3412-Apr-06 6:24 
AnswerRe: How do I enter a field with the entry selected Pin
darkelv12-Apr-06 6:42
darkelv12-Apr-06 6:42 
QuestionSteganography in BMP Pin
nwr_mn12-Apr-06 6:10
nwr_mn12-Apr-06 6:10 
NewsRe: Steganography in BMP Pin
leppie12-Apr-06 6:51
leppie12-Apr-06 6:51 
GeneralRe: Steganography in BMP Pin
nwr_mn12-Apr-06 7:19
nwr_mn12-Apr-06 7:19 
GeneralRe: Steganography in BMP Pin
Dave Kreskowiak12-Apr-06 8:05
mveDave Kreskowiak12-Apr-06 8:05 
GeneralRe: Steganography in BMP Pin
leppie12-Apr-06 20:06
leppie12-Apr-06 20:06 
QuestionThreading help? Pin
eric_tran12-Apr-06 5:44
eric_tran12-Apr-06 5:44 
AnswerRe: Threading help? Pin
Robin Panther12-Apr-06 5:59
Robin Panther12-Apr-06 5:59 
Questiontextbox cursor position Pin
PaulaM12-Apr-06 5:18
PaulaM12-Apr-06 5:18 
AnswerRe: textbox cursor position Pin
AB777112-Apr-06 5:23
AB777112-Apr-06 5:23 

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.