The [Record] macro is applied to classes and makes it very easy to create simple data-transfer objects.
Watch the Screencast
using System;
namespace MacrosDemo
{
public class CustomerDto
public Id : int;
public FirstName : string;
public LastName : string;
public IsPrefered : bool;
public this(id : int, firstName : string, lastName : string, isPrefered : bool)
Id = id;
FirstName = firstName;
LastName = lastName;
IsPrefered = isPrefered;
}
module Program
Main() : void
def dto = CustomerDto(1, "John", "Smith", true);
using Nemerle.Utility;
[Record]
Powered by: newtelligence dasBlog 2.2.8279.16125
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Andrew Davey
E-mail