That's what the error message says:
add is a generic
List that holds elements of type
Category.
In your first commented code line, you're accessing
add's property
Relations. But since
add is a list, it doesn't have a property of that name.
1) "add" is a very very very bad name for a variable. Better use nouns for variable names, verbs for method names. Especially since "add" is a verb you're going to use frequently in conjuction with generic lists.
2) Since I don't know anything about the
Category class, I presume that it has properties "Relations" and "Tables". Given that, you could access them this way:
add[correctIndex].Relations.Add(new DataRelation());
But that's merely guesswork. You should use the "Improve question" link above and provide some more insight into the classes you use.
List<t>[
^] belongs to the framework. We have MSDN for details.
The interesting parts are "Category", "CategoriesRelation" and maybe the types of "Relations", "Tables" and "Columns".