Names Date Time
Sandra 11/18/2013 10.12AM
Denise 12/21/2013 10.10PM
Prnikshenth 11/11/2019 12.00AM
using System;
using System.Collections;
using System.IO;
class FunWithScheduling
{
public void AddView()
{
FileStream s = new FieStream("Scheduler.txt",FileMode.Append,FileAccess.Write);
StreamWriter w = new StreamWriter(s);
Console.WriteLine("Enter the Name of the Person To Be Met:");
string name = Console.ReadLine();
w.Write(name);
w.Flush();
w.Close();
s.Close();
}
public static void Main(string[] args)
{
FunWithScheduling a = new FunWithScheduling();
a.AddView();
}
}
我使用此代码添加了一个名称,但它是这样存储的
Names Date Time
Sandra 11/18/2013 10.12AM
Denise 12/21/2013 10.10PM
Prnikshenth 11/11/2019 12.00AMShawn
我添加了肖恩,但这就是它被时间卡住的方式。