Sync
This commit is contained in:
parent
6f050a029e
commit
776bba907c
3887 changed files with 59894 additions and 7280 deletions
19
Task/Classes/Nemerle/classes.nemerle
Normal file
19
Task/Classes/Nemerle/classes.nemerle
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
public class MyClass
|
||||
{
|
||||
public this() { } // the constructor in Nemerle is always named 'this'
|
||||
|
||||
public MyVariable : int
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public MyMethod() : void
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
def myInstance = MyClass(); // no 'new' keyword needed
|
||||
myInstance.MyVariable = 42; // set MyVariable
|
||||
System.Console.WriteLine($"My variable is $(myInstance.MyVariable)") // get MyVariable
|
||||
Loading…
Add table
Add a link
Reference in a new issue