å°ãã¿ã§ãã LINQã§å¦çãã±ã±ã£ã¨1ã¹ãã¼ãã¡ã³ãã§æ¸ããã¨æ°æã¡ããã§ãããã ã§ãããããã°é£ãããªãï¼ã¨ãããã¨ãããã®ã§ãã大ä¸å¤«ã§ãå®å¿ãã¦ãã ããã ãã¬ã¼ã¯ãã¤ã³ãã®ã¯ãæ¹ã®ã³ãããã¤ããã°å¤§ä¸å¤«ã§ããä¾ãã°ä»¥ä¸ã®ãããªã³ã¼ããããã¨ãã¾ãã using System; using System.Linq; namespace ConsoleApp10 { class Program { static void Main(string[] args) { var numbers = new[] { 1, 2, 2, 3, 3, 3, 4, 4, 4 }; var values = numbers .Where(x => x % 2 == 0) .Distinct() .Select(x => x * x); foreach (var value in values) {
{{#tags}}- {{label}}
{{/tags}}