-3
public List<Faculty> Faculties {get;set;}   
List<Faculty> faculties = FacultiesManager.Faculties;
Faculties.Add(something);

how can i interact with the object list

nomnom
  • 17
  • 4

2 Answers2

1

It seems like the list is not initialised. You need to call:

Faculties = new List<Faculty>();

before you can interact with the list.

Ahsan Zia
  • 46
  • 3
-1

It should be

public List<Faculty> Faculties = new List<>

instead of

public List<Faculty> Faculties {get; set;}
LarsTech
  • 80,625
  • 14
  • 153
  • 225