Если я хочу создать свой простой тип, как я могу получить доступ к его значению из метода типа?
Например:
[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
отлично работает.