是否可以在类函数中访问class本身: static get myFunction() { return "foo"; } constructor() {console.log(MyClass.myFunction); // "foo" -- it works when using its name.(this.prototype.myFunction); //Cannot read property '<
我需要澄清从C#中的方法返回对象的方式。public class Person public string Forename {get;set;}}public static Person MyFunction() Person oPerson = new Person();
oPerson.Forename = "Joe"