[TypeScript] Dictionary范例

[TypeScript] Dictionary范例

Playground

Samples

class Dictionary {
[index: string]: string;
} class Test { public run() {
var parameters = new Dictionary();
parameters["A"] = "A01";
parameters["B"] = "B01";
parameters["C"] = "C01"; for (var key in parameters) {
alert(
"key=" + key + "\n" +
"value=" + parameters[key] + "\n"
);
}
}
} var test = new Test();
test.run();
上一篇:Spring AOP动态代理实现,解决Spring Boot中无法正常启用JDK动态代理的问题


下一篇:Java的反射机制和动态代理