Home>

Set Excel file to application using Excel Importer Maker
I'm making an application that uses Linq to extract by conditions.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System.Linq;
public class ResultMessage: MonoBehaviour
{
    #pragma warning disable 649
    [SerializeField] Entity_Hogelist eHogelist;
    void Start ()
    {
        var resultList = eHogelist.sheets [0] .list.Where (data =>data.Hogehoge>20.0f) .FirstOrDefault ();
        Debug.Log ("resultList:" + resultList.name);
    }
}


Using the above code from the Excel file, you can display the name item of the first data when the "Hogehoge" item is greater than 20.

There are two questions.
1st)
"Hogehoge" item has more than 20 data, but there are 5 items in total. I want to extract all 5 name items.
How can I do that?
Second)
In the above code, "var resultList =" var is type inference, but what type is var in this case?

Environment)
PC: mac
Unity2018.3.14f1
Language: C #