I have the following code:
public class settings
{
public appConfig conf = new appConfig();
public void getUserID(int listIndex, int newID)
{
conf.users[listIndex].ID = newID;
}
private class appConfig {
public List<user> users;
public appConfig()
{
users = new List<user>();
}
}
}
public class user {
public int ID;
}
So with that code I use
var set = new settings();
set.setUserID(0, 20);
How can I change the code so I can access it like this:
var set = new settings();
set.userPropertys(listIndex).ID = newID;
How should I declare the userPropertys
? Is it a method or a new class or what?