questions on services and csv files

  • Thread starter Thread starter KR
  • Start date Start date
K

KR

Hello all
I am a C# beginner. I am looking to know how

1. from inside a class library,
I can stop and restart services? (that you can see in the
Control panel - Services - snap-in?

2. I also need to know how a .csv file can be read from
c#? what classes should be used?

Any help and sample code is appreciated.
Thanks in advance.
 
For the .csv file, use the TextReader object to read in the file like any
other text file, then use the .Split method on each line of the file to
extract the data into an array.

There may be an easier way in the framework, but thats how I've always done
it.

-James
 
For your first question, take a look at
System.ServiceProcess.ServiceController.

--
Kai Brinkmann [MSFT]

Please do not send e-mail directly to this alias. This alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top