【发布时间】:2020-01-24 11:05:09
【问题描述】:
如果我想创建我的简单类型,如何从 type 方法访问它的值?
例如:
[IntegerType (rank = 6, signed = true, width = 32)]
[SimpleType]
[CCode (has_type_id = false)]
struct foo_t {
public string say_hello(){
return(@"Hello from new foo_t type");
}
public int x10(){
return this.value * 10;
}
}
这里this.value 抛出错误The name 'value' does not exist。say_hello 工作正常。
【问题讨论】: