Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 105,753 C# Programmers for FREE! Ask your question and get quick answers from experts. There are 1,774 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



payroll

 
Reply to this topicStart new topic

payroll, please

asareel
post 30 Jun, 2008 - 11:13 AM
Post #1


New D.I.C Head

*
Joined: 30 Jun, 2008
Posts: 1

can u write me a simple code c# to read from file the salary of an employee
User is offlineProfile CardPM

Go to the top of the page


zakary
post 30 Jun, 2008 - 11:24 AM
Post #2


D.I.C Regular

Group Icon
Joined: 15 Feb, 2005
Posts: 362



Thanked 4 times

Dream Kudos: 175
My Contributions


We could but that would be cheating and we here at Dream in Code have a policy that Just does not allow us to help someone cheat. Now if you try and write it your self you can post your code and we will be glad to help you with your errors.
User is online!Profile CardPM

Go to the top of the page

jacobjordan
post 30 Jun, 2008 - 11:27 AM
Post #3


class Me : Perfection

Group Icon
Joined: 11 Jun, 2008
Posts: 543



Thanked 14 times

Dream Kudos: 1300
My Contributions


If you are using c#.net, there are 2 ways you could do this:

csharp

string filecontents = System.IO.File.ReadAllText("FilePath");

That will read all the contents of a file and store it in a variable.

The other way is with the Microsoft.VisualBasic.FileSystem class. To open a file with it, use

csharp

Microsoft.VisualBasic.FileSystem.FileOpen()

to input a line with that class, do

csharp

Microsoft.VisualBasic.FileSystem.LineInput()

and to close the file when you are done with it, do

csharp

Microsoft.VisualBasic.FileSystem.FileClose()

User is offlineProfile CardPM

Go to the top of the page

turtleC++
post 1 Jul, 2008 - 02:51 PM
Post #4


New D.I.C Head

*
Joined: 7 May, 2008
Posts: 41

I'm very new to nternet resource, but if you know what you want, search for the keyword, there are plenty of examples.

Here are some:
http://www.csharp-station.com/HowTo/ReadWriteTextFile.aspx
http://www.devhood.com/Tutorials/tutorial_...tutorial_id=400
http://msdn.microsoft.com/en-us/library/b9skfh7s.aspx

I just finished almost related to what you are doing so these links should be a good start.
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 8/21/08 12:17PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month