Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace DemoApplication
- {
- class Tutorial
- {
- static void Main(string[] args)
- {
- String path = @"C:\Users\hp\Desktop\test\TemenuzhkaGrozdanova_18114177.txt";
- using (StreamWriter sr = File.AppendText(path))
- {
- sr.WriteLine(DateTime dtToday = DateTime.Now;
- dtToday.ToString(" dd MMMM yyyy HH:mm:ss"));
- sr.WriteLine(Console.WriteLine($"Value {0} \n Currency {1} \n Date and time {2}", dtToday));
- sr.Close();
- Console.WriteLine(File.ReadAllText(path));
- }
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment