C#ã®LINQã¡ã½ããã¯è¶ 便å©!!ããªãã§ããâ¦èå¿ã®APIããããã¥ããã§ãã ããã§ã種é¡ãã¨ã«ã¾ã¨ãã¦ãç°¡åãªãµã³ãã«ãæ¸ãã¦ã¿ã¾ããã çµæã®è¡¨ç¤ºã«ãç¬èªã®æ¡å¼µã¡ã½ãã ToResult(this IEnumerable) ã使ç¨ãã¦ãã¾ãããã®ã¡ã½ããã¯ãæ¬æã®æå¾ã«è¨è¼ãã¦ãã¾ãã ãµã³ãã«ã³ã¼ãã®ãã¦ã³ãã¼ãã¯ãã¡ãã è¦ç´ ã®åå¾ï¼åä¸ï¼ ã¡ã½ããå æ©è½ ElementAt ElementAtOrDefault æå®ããä½ç½®(ã¤ã³ããã¯ã¹)ã«ããè¦ç´ ãè¿ãã¾ãã First FirstOrDefault æåã®è¦ç´ ãè¿ãã¾ãã Last LastOrDefault æå¾ã®è¦ç´ ãè¿ãã¾ãã Single SingleOrDefault å¯ä¸ã®è¦ç´ ãè¿ãã¾ãã該å½ããè¦ç´ ãè¤æ°ããå ´åãä¾å¤ãã¹ãã¼ãã¾ãã 該å½ã®è¦ç´ ããªãå ´åã¯â¦ ããOrDefaultããä»ãã¦ããªãã¡ã½ã
{{#tags}}- {{label}}
{{/tags}}