-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
42 lines (40 loc) · 1.43 KB
/
Program.cs
File metadata and controls
42 lines (40 loc) · 1.43 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace Lesson_8
{
class Program
{
static void Main(string[] args)
{
if (string.IsNullOrEmpty(Properties.Settings.Default.UserName))
{
Console.WriteLine("Введите имя пользователя:");
Properties.Settings.Default.UserName = Console.ReadLine();
Properties.Settings.Default.Save();
}
if (string.IsNullOrEmpty(Properties.Settings.Default.UserJob))
{
Console.WriteLine("Кем Вы, "+ Properties.Settings.Default.UserName+" работаете: ");
Properties.Settings.Default.UserJob = Console.ReadLine();
Properties.Settings.Default.Save();
}
if (string.IsNullOrEmpty(Properties.Settings.Default.Age))
{
Console.WriteLine( Properties.Settings.Default.UserName + ", сколько Вам лет: ");
Properties.Settings.Default.Age = Console.ReadLine();
Properties.Settings.Default.Save();
}
string userAge = Properties.Settings.Default.Age;
string userName = Properties.Settings.Default.UserName;
string greeting = Properties.Settings.Default.Greeting;
string userJob = Properties.Settings.Default.UserJob;
Console.WriteLine($"{greeting},{userName}!");
Console.WriteLine("Вам "+ userAge+" и Вы работаете "+userJob+".");
Console.ReadLine();
}
}
}