Click here to Skip to main content
16,005,037 members
Home / Discussions / C#
   

C#

 
GeneralRe: const vs readonly Pin
coolestCoder25-Aug-06 0:53
coolestCoder25-Aug-06 0:53 
AnswerRe: const vs readonly Pin
Not Active25-Aug-06 2:36
mentorNot Active25-Aug-06 2:36 
AnswerRe: const vs readonly Pin
Scott Dorman1-Sep-06 13:50
professionalScott Dorman1-Sep-06 13:50 
Question64 bit application Pin
psamy24-Aug-06 23:48
psamy24-Aug-06 23:48 
AnswerRe: 64 bit application Pin
Not Active25-Aug-06 2:31
mentorNot Active25-Aug-06 2:31 
GeneralRe: 64 bit application Pin
Dave Kreskowiak29-Aug-06 2:08
mveDave Kreskowiak29-Aug-06 2:08 
QuestionThread with ListView Pin
mm31024-Aug-06 23:30
mm31024-Aug-06 23:30 
AnswerRe: Thread with ListView [modified] Pin
coolestCoder24-Aug-06 23:45
coolestCoder24-Aug-06 23:45 
Hi,
You can create new object of Thread class and assign a function which will perform the above said operation for you. Remember that the function should not return any thing (ie return type = void ) and should not accept any arguments. In case if you want to pass some arguments when the thread will actually start then you can use fields or properties which would be accessible from inside the function. For example --


Thread objThread = new Thread(new ThreadStart(this.FunctionName));<br />
objThread.Start();


the FunctionName would be your function defined as below--

  public void FunctionName()<br />
  {<br />
   ListViewItem lvi = new ListViewItem(new string[] { splitString[1],    splitString[2].Substring(0, 12), splitString[2].Substring(17, 12), tempstring });<br />
this.listView1.Items.Add(lvi);<br />
   }<br />



If you want now to pass any arguments to FunctionName then use fields or properties. Means before u call objThread.Start() assign the right fields with the values you want to pass to the Thread.

Hope i am clear !





<marquee>"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder

Anant Y. Kulkarni

GeneralRe: Thread with ListView Pin
mm31025-Aug-06 0:21
mm31025-Aug-06 0:21 
GeneralRe: Thread with ListView Pin
coolestCoder25-Aug-06 0:43
coolestCoder25-Aug-06 0:43 
Questionhow to get single item in foreach loop ?? Pin
sikandarhayat24-Aug-06 21:35
sikandarhayat24-Aug-06 21:35 
AnswerRe: how to get single item in foreach loop ?? Pin
Martin#24-Aug-06 21:41
Martin#24-Aug-06 21:41 
GeneralRe: how to get single item in foreach loop ?? Pin
sikandarhayat24-Aug-06 21:54
sikandarhayat24-Aug-06 21:54 
AnswerRe: how to get single item in foreach loop ?? [modified] Pin
Martin#24-Aug-06 22:16
Martin#24-Aug-06 22:16 
GeneralRe: how to get single item in foreach loop ?? Pin
sikandarhayat25-Aug-06 0:04
sikandarhayat25-Aug-06 0:04 
AnswerRe: how to get single item in foreach loop ?? Pin
Guffa25-Aug-06 0:08
Guffa25-Aug-06 0:08 
AnswerRe: how to get single item in foreach loop ?? Pin
Coding C#25-Aug-06 3:15
Coding C#25-Aug-06 3:15 
AnswerRe: how to get single item in foreach loop ?? Pin
Ennis Ray Lynch, Jr.25-Aug-06 3:22
Ennis Ray Lynch, Jr.25-Aug-06 3:22 
AnswerRe: how to get single item in foreach loop ?? Pin
Scott Dorman1-Sep-06 14:08
professionalScott Dorman1-Sep-06 14:08 
QuestionGraphicsState and hardware Pin
s o v a n n24-Aug-06 21:25
s o v a n n24-Aug-06 21:25 
AnswerRe: GraphicsState and hardware Pin
leppie25-Aug-06 0:30
leppie25-Aug-06 0:30 
QuestionListBox With Tree Pin
Aslam Bari24-Aug-06 21:05
Aslam Bari24-Aug-06 21:05 
GeneralRe: ListBox With Tree Pin
CooperWu24-Aug-06 23:19
CooperWu24-Aug-06 23:19 
QuestionDateTime.ParseExact method query [modified] Pin
chandler8324-Aug-06 20:48
chandler8324-Aug-06 20:48 
AnswerRe: DateTime.ParseExact method query Pin
Guffa24-Aug-06 21:57
Guffa24-Aug-06 21:57 

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.