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 chg
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Add meg a dátumot, órát percet amire módosítani szeretnéd a mentési dátumot, és a fájl nevét");
- Console.WriteLine();
- Console.WriteLine();
- Random sec = new Random();
- Console.Write("év: ");
- int year = Convert.ToInt32(Console.ReadLine());
- Console.Write("hónap: ");
- int month = Convert.ToInt32(Console.ReadLine());
- Console.Write("nap: ");
- int day = Convert.ToInt32(Console.ReadLine());
- Console.Write("óra: ");
- int hour = Convert.ToInt32(Console.ReadLine());
- Console.Write("perc: ");
- int min = Convert.ToInt32(Console.ReadLine());
- Console.Write("fájlnév: ");
- string name = Console.ReadLine();
- var hm = new DateTime(year, month, day, hour, min, sec.Next(0, 60));
- File.SetLastWriteTime(name, hm);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement