Hogeã¯ã©ã¹ã®ã³ã³ã¹ãã©ã¯ã¿ãå®ç¾©ããã ã¯ã©ã¹å ã§å®ç¾©ãããä»ã®ã³ã³ã¹ãã©ã¯ã¿ãå¼ã¶ã«ã¯thisãå©ç¨ããã ãã®å ´åãthisã§å¼ã³åºããã³ã³ã¹ãã©ã¯ã¿ãã©ã®ã¿ã¤ãã³ã°ã§å¼ã³åºãããã調ã¹ãã public class Hoge { public Hoge() : this(3) { Console.WriteLine("Hoge() called"); } public Hoge(int n) : this(new string[]{"hoge"}) { Console.WriteLine("Hoge(int n) called"); } public Hoge(string[] items) { Console.WriteLine("Hoge(string[] items) called"); } } 以ä¸ã¯å¼ã³åºãå ã®ã³ã¼ã new Hoge(); new Hoge(3); n
{{#tags}}- {{label}}
{{/tags}}