→ vi000246: 用List 11/10 21:10
→ james999: 具體怎麼使用呢? 我直接指定array給List直接報錯.. 11/12 14:19
代碼
--
[HttpPost]
public int AssignMemberToGroup(int[] paramGo)
{
int total = 0;
var results = new List<int>();
for (var i = 0; i < paramGo.Length; i++)
{
var temp = new int();
temp = paramGo[i];
results.Add(temp);
}
return total;
}
--
參照網上搜到的...
https://stackoverflow.com/questions/34314306/webapi-passing-an-array-of-values
※ 編輯: james999 (1.34.236.60), 11/12/2017 14:35:04
推 Wermut: 試試看([FromBody]AddStudentParams[] paramAddStudent) 11/13 06:06