How to get first object out from List<Object> using Linq

前端 未结 10 1327
自闭症患者
自闭症患者 2020-12-29 00:51

I have below code in c# 4.0.

//Dictionary object with Key as string and Value as List of Component type object
Dictionary>         


        
10条回答
  •  时光取名叫无心
    2020-12-29 01:42

    I do so.

    List list = new List();
    
    if(list.Count>0){
      Object obj = list[0];
    }
    
        

    提交回复
    热议问题