-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
49 lines (36 loc) · 1.36 KB
/
Copy pathProgram.cs
File metadata and controls
49 lines (36 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using System;
using System.IO;
namespace Projeto_4
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
Console.WriteLine("Qual seu nome completo?");
string nome = Console.ReadLine();
Console.WriteLine("Qual a sua idade?");
string idade = Console.ReadLine();
Console.WriteLine("Qual seu local de nascimento?");
string local = Console.ReadLine();
// FileInfo fi = new FileInfo("Arquivo.txt");
// if(fi.Exists == true)
// {
// Console.WriteLine("Tamanho: " + fi.Length + " Bytes");
// Console.WriteLine("Extensão: " + fi.Extension);
// Console.WriteLine("Local do arquivo: " + fi.DirectoryName);
// Console.WriteLine("Criado em: " + fi.CreationTime);
// }
// else
// Console.WriteLine("O arquivo não existe.");
StreamWriter doc = new StreamWriter("Arquivo.csv", true);
doc.WriteLine("Nome completo: " + nome);
doc.WriteLine();
doc.WriteLine("Idade: " + idade);
doc.WriteLine();
doc.WriteLine("Local de nascimento: " + local);
doc.WriteLine();
doc.Close();
}
}
}