write last line txt file c#

C#
private string Add(string asd) {
    string filename = "asd.txt";
    File.AppendAllText(filename, asd);
}
Source

Also in C#: