public class UserModel
{
public string FirstName { get; set; }
public string LastName { get; set; }
public List<AccountModel> Accounts { get; set; } = new List<AccountModel>();
}
public class AccountModel
{
public string AccountType { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public AccountModel(string account_type, string email, string password)
{
this.AccountType = account_type;
this.Email = email;
this.Password = password;
}
}
_userList.Add(new UserModel() {
FirstName = "Jack",
LastName = "The Sparrow",
Accounts = new List<AccountModel>()
{
new AccountModel("Yandex","rambler@mail.ru","321312"),
new AccountModel("Yandex","rambler@mail.ru","321312"),
}
});
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter your name: ");
string name = Console.ReadLine();
char[] charArr = name.ToCharArray();
Array.Reverse(charArr);
string reName = string.Join("",charArr);
Console.WriteLine(reName);
Console.ReadKey();
}
}
double x1;
if(double.TryParse(textBox1.Text,out x1))
{
double x2 = x1 * 3;
double y;
y = Math.Sqrt(56 + ((x1 + x2 + Math.Sin(x1 * x2)) / (5 * Math.Cos(Math.Pow(x2, 2)))));
textBox2.Text = $"Х равен {x1} Значение y {y}";
}
else
{
MessageBox.Show("Значение введено не верно!!!");
textBox1.Text = "";
textBox2.Text = "";
}