List<ListOrRecordRef> List = new List<ListOrRecordRef>();
ListOrRecordRef RecordRefItem = new ListOrRecordRef();
RecordRefItem.name = "American Express";
RecordRefItem.internalId = "898";
RecordRefItem.typeId = "394";
List.Add(RecordRefItem);
rec.customFieldList = List.ToArray();
WriteResponse response = service.add(rec);
The code is used to add multiselect option of vendor. ex : american express
First of all like Heinz Siahaan said: 'List' is a keyword in C# so you can't create variable with this name.
Second:
I'm not sure but name of this method suggest that this line of code creates list of records not one item so you can't use something like this:
but you should try :
where i is and index of element, but before access it you must create it