static void Main(string[] args) { Exercicio1.Executar(); Exercicio2.Executar(); Exercicio3.Executar(); Exercicio4.Executar(); Exercicio5.Executar(); Exercicio6.Executar(); }
public ActionResult Exercicio5Result(Exercicio5 model) { StreamWriter x; string dataDir = AppDomain.CurrentDomain.GetData("DataDirectory").ToString(); string Caminho = dataDir + @"\\../File\\dados.txt"; //string Caminho = @"C:\\Users\\fhenriquedeo\\Desktop\\Teste Kaffa\\Kaffa - Pre-qualification test\\Kaffa - Pre-qualification test\\File\\dados.txt"; System.IO.File.AppendText(Caminho).Close(); if (ModelState.IsValid) { x = System.IO.File.AppendText(Caminho); x.WriteLine(); x.WriteLine("__________________________________________________"); x.WriteLine("Nome: " + model.nome); x.WriteLine("Sobrenome: " + model.sobrenome); x.Close(); } return(RedirectToAction("Exercicio5")); }
static void Main(string[] args) { Exercicio5.Executar(); Console.ReadKey(); }