Instead of this:
vm.memberships1[0].consumerId = "23456";
Use this:
vm.memberships1.Add(new exMember(){consumerId="23456"});
Note:
memberships1
list has been initiated but it's empty (does not have any element). So, when you try to refer to the first element on the list, it causes
ArgumentOutOfRangeException
(
NOT a
NullReferenceException
!!!).
BTW: Why
clientId
and
consumerId
is type of string? For numbers you should use proper data type!