0

Possible Duplicate:
How do you add a timer to a C# console application

i have a console application. Now to the timer function I want to pass a streamwriter object so that i can write a certain set of data after elapse of say like 10 seconds. How do i do it??

Community
  • 1
  • 1
olive
  • 2,983
  • 5
  • 21
  • 20

1 Answers1

0

You don't pass the streamwriter in, use a member variable.

Manicguitarist
  • 329
  • 1
  • 2
  • 11
  • I didn't get you.. If you trying to say to declare new streamwriter variable in the thread method then it's a problem because i have to use the same file for writing operations in the main method too. N it gives an error that file already being used. – olive Mar 14 '11 at 06:04