Answers for "save file with unique name c#"

C#
0

save file with unique name c#

public string GenerateFileName(string context)
{
    return context + "_" + DateTime.Now.ToString("yyyyMMddHHmmssfff") + "_" + Guid.NewGuid().ToString("N");
}

filename1 = GenerateFileName("MeasurementData");
filename2 = GenerateFileName("Image");
Posted by: Guest on August-07-2021

C# Answers by Framework

Browse Popular Code Answers by Language