pasha
pasha
CC#
Created by Yukonヌ on 11/18/2024 in #help
Get another writeline on second itteration
it's not right to do this, store different things in one array :sadge:
211 replies
CC#
Created by Yukonヌ on 11/18/2024 in #help
Get another writeline on second itteration
create a User class that will store the user and password
public class User
{
public string UserName { get; set; }
public string Password { get; set; }
}
public class User
{
public string UserName { get; set; }
public string Password { get; set; }
}
example
User[] user = new User[2];
for (int i = 0; i < user.Length; i++)
{
Console.WriteLine("Pick a username: ");
user[i].UserName = Console.ReadLine();

Console.WriteLine("Pick a password: ");
user[i].Password = Console.ReadLine();
}
User[] user = new User[2];
for (int i = 0; i < user.Length; i++)
{
Console.WriteLine("Pick a username: ");
user[i].UserName = Console.ReadLine();

Console.WriteLine("Pick a password: ");
user[i].Password = Console.ReadLine();
}
211 replies