Oop 是否可以将void作为字符串调用?
我一直在寻找这个,但它有点难以描述,所以我只想在这里问一下。是否可以将void作为字符串调用 我认为一个例子可以更好地描述它:Oop 是否可以将void作为字符串调用?,oop,vala,Oop,Vala,我一直在寻找这个,但它有点难以描述,所以我只想在这里问一下。是否可以将void作为字符串调用 我认为一个例子可以更好地描述它: //list of voids in the other class string[] voids = {"expand()", "show()", "yolo()"}; anotherclass class = new anotherclass(); //call to the void named expand inside the other class cl
//list of voids in the other class
string[] voids = {"expand()", "show()", "yolo()"};
anotherclass class = new anotherclass();
//call to the void named expand inside the other class
class.voids[0]; //??????
为什么使用字符串数组,使用函数指针数组 两个好链接:
即使vala支持指针,这似乎也不起作用。您能展示一个使用vala语言的示例吗?在vala中称为
delegate
: