Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 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