static async Task NMain(int p,string q,string r) { List<string> serverList = new List<string>(); serverList.Add("mongodb://*****:*****@"C:\Users\eliaszaman\Desktop\test\"+FileID); tw.Write(FileData,Encoding.UTF8); tw.Close(); String FileKey = document.GetElement("FileKey").ToString(); var theString3 = FileKey; var aStringBuilder3 = new StringBuilder(theString3); aStringBuilder3.Remove(0, 8); FileKey = aStringBuilder3.ToString(); TextWriter tw2 = File.CreateText(@"C:\Users\eliaszaman\Desktop\test\key\encr.txt"); tw2.Write(FileKey, Encoding.UTF8); tw2.Close(); String FileExtension = document.GetElement("FileExtension").ToString(); var theString4 = FileExtension; var aStringBuilder4 = new StringBuilder(theString4); aStringBuilder4.Remove(0, 14); FileExtension = aStringBuilder4.ToString(); TextWriter tw3 = File.CreateText(@"C:\Users\eliaszaman\Desktop\test\install\extension.x"); tw3.Write(FileExtension, Encoding.UTF8); tw3.Close(); } } } //watch.Stop(); // string pTime = elapsedMss.ToString(); stW.Stop(); File.AppendAllText(@"C:\Users\eliaszaman\Desktop\test\install\time.txt", stW.ElapsedMilliseconds.ToString()+Environment.NewLine); stW.Reset(); } }