I am creating an interpreter from IL (A compiled C#\VB code) to C. I tried to create extern property when I interpret it I’ll set my own code.
For an example:
struct String {
public extern override ValueType Clone( ); //Works but with some warnings.
public char this[ int index ] {
extern get;
//'System.String.this[int].get' must declare a body because it is not marked abstract, extern, or partial
//The modifier 'extern' is not valid for this item
extern set; //Didn't work either.
}
}
How I can make getters and setters without body? (BTW I can’t mark it as abstract too without getting errors.)
I know this question isn’t useful. But very to me.
I think you want to suggest your interpretator to use alternative implemetation (instead of IL use your custom code). Most CLR friendly way would be to create attribute that your interpreter will read and correspondingly use some of your own code, sort of reverse PInvoke.