C#範例-進階存取

範例

取得全部"品項1~20"的欄位值:

foreach (var row in PBTable.CardForm)
{
    var sb = new StringBuilder();
    for (int i = 1; i <= 20; i++)
    {
        var value = (float)row["items_" + i];
        sb.Append(value).Append(",");
    }
    Debug.Log(sb.ToString());
}

// output:
// 1101,1102,1103,1104,1105,2101,2102,2103,2104,2105,3101,3102,3103,3104,3105,4101,4102,4103,4104,4005,
// 1201,1202,...

results matching ""

    No results matching ""