28 lines
361 B
Plaintext
28 lines
361 B
Plaintext
import extensions;
|
|
|
|
class MyClass
|
|
{
|
|
prop int 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)
|
|
}
|