27 lines
375 B
Text
27 lines
375 B
Text
import extensions;
|
|
|
|
class MyClass
|
|
{
|
|
int Variable : prop(_variable);
|
|
|
|
someMethod()
|
|
{
|
|
_variable := 1
|
|
}
|
|
|
|
constructor()
|
|
{
|
|
}
|
|
}
|
|
|
|
public Program()
|
|
{
|
|
// instantiate the class
|
|
var instance := new MyClass();
|
|
|
|
// invoke the method
|
|
instance.someMethod();
|
|
|
|
// get the variable
|
|
Console.printLine("Variable=",instance.Variable)
|
|
}
|