public class Role
{
public string RoleName { get; set; }
public int RoleId { get; set; }
public Role(int roleid, string roleName)
{
RoleName = roleName;
RoleId = roleid;
}
}
public class RoleManagement
{
public List<Role> RoleList = new List<Role>();
RoleList.Add(1, "Software Engineer");
}
I am trying to add some values to the list
I am facing a errors such as
Type Expected
Tuple must contain atleast two elements
How can i add some elements into the list
RoleList? What is the type of the parameter(s) toRoleList.Add()? What type(s) are you passing? How can you create an object of the correct type(s) to pass toRoleList.Add()?