KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I created a property of type List in my class public List<string> CategoryRef { get; set; } Now when I wanna add a string to the list I try Product p=new Product(); p.CategoryRef.Add("Nick"); The compiler yells at me saying the object isnt set to an instance of an object. How to I instantiate a property?
Tags (comma-separated)
Save Edits
Cancel