Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.IO;
- namespace DateAndMoney
- {
- class InputNode
- {
- DateTime dateTime;
- string dollarAmount;
- }
- class Program
- {
- public static void ReadFile(string filename)
- {
- InputNode inputNode = new InputNode();
- if (System.IO.File.Exists(filename))
- {
- var reader = new StreamReader(File.OpenRead(filename));
- while (!reader.EndOfStream)
- {
- var input = reader.ReadLine();
- var values = input.Split(',');
- inputNode.dateTime = values[0];
- inputNode.dollarAmount = values[1];
- }
- }
- }
- static void Main(string[] args)
- {
- string filename;
- Console.WriteLine("enter path and file name of input file");
- filename = Console.ReadLine();
- ReadFile(filename);
- }
- }
- }
- inputNode.dateTime = values[0];
- inputNode.dollarAmount = values[1];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement