473,378 Members | 1,469 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

questions on services and csv files

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.
Nov 16 '05 #1
2 932


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

"KR" wrote:
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.

Nov 16 '05 #2
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.
"KR" <an*******@discussions.microsoft.com> wrote in message
news:41****************************@phx.gbl...
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.

Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jan Waga | last post by:
Hello, I've written and installed windows service in C#. I have two questions: 1) File.Open("lock", FileMode.OpenOrCreate, FileAccess.Read, FileShare.None) does not create the file even if...
8
by: Navin Mishra | last post by:
Hi, Can an ASP.NET web service project expose two different web services perhaps by having two .ASMX files ? Is it possible to have a web emethod that does not appear in auto-generated WSDL and...
3
by: Phil Lee | last post by:
Hi, I have a few questions regarding web services in .NET 2 1) Why, when I run code analysis do I get a source controlled files named {guid}/codeanalysislog.xml...
0
by: Michael.Suarez | last post by:
So we develop and maintain several applications used by several people in the same company, on the same intranet. There are several applications written in VB6, but going forward all of the new...
1
by: Jobs | last post by:
What is application object ? Application object can used in situation where we want data to be shared across users globally. What's the difference between Cache object and application object...
5
by: JT | last post by:
Hi, I think I need a "best practices" lesson on web sites and web services. In order to conform to the restraints of my web host, my web services seem to need to be in a subfolder of my web...
4
by: shamirza | last post by:
4 9 6 18.ATLAS-AJAX Note: - As an IT professional it's useful to know what the difference is between Hype and usefulness. For instance if there is a new technology coming in many programmers...
5
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
This code works fine in Windows Application. In Windows Application, I am able to zip the image files properly and it totally contains 900MB My problem is the same code which I used in my Windows...
5
by: Chizl | last post by:
I'm cross posting, sorry, but this pertains to both sides.. I have a Web Services written in C# and a client written in VC6. I've never uploaded files through web services so forgive my...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.