Sujeet Raman

Sujeet Raman

  • 862
  • 927
  • 357k

IReadonlyList<>does not contain the defenition for property

Jan 5 2023 8:20 AM

I have created a list object 

public IReadOnlyList<employee>? employeelist{ get; set; }

and I am assigning

public string EmployeeType =>
       ContentTypes.GetemployeeType(employeelist?._manager, employeelist?.File.address?? string.Empty);

here am getting above error;--in (employeelist?._manager, employeelist?.File.address)

class i am using

public class employee:filedetails
{
    public employee(IBrowserFile file)
    {
        File = file ?? throw new ArgumentNullException(nameof(file));
        FileName = Path.GetFileName(File.Name);
    }
    public IBrowserFile File { get; }
}

how i can fix these?


Answers (3)