InheritConstructors is a handy macro when you need to simply pass all arguments to a base constructor.
Watch the Screencast
using System;
namespace MacrosDemo
{
public class MyBaseClass
public this(name : string, foo : int, bar : bool)
_name = name;
_foo = foo;
_bar = bar;
}
_name : string;
_foo : int;
_bar : bool;
public virtual Test() : string
"Hello from MyBaseClass"
public class MySubClass : MyBaseClass
base(name, foo, bar)
public override Test() : string
"Hello from MySubClass"
module Program
Main() : void
using Nemerle;
[InheritConstructors]
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