sorry for making so much noise.. figured it out by myse4lf.
interface IBindingList {
@property bool AllowEdit();
//@property bool AllowEdit(bool enable);
//remove // to enable setter
}
class A : IBindingList {
private bool _allowEdit;
@property {
bool AllowEdit() { return _allowEdit; }
//bool AllowEdit(bool enable) { return _allowEdit = enable; }
}
}
bjoern
On 29/06/2010 12:11, BLS wrote:
Just wonder how to translate this C# snippet into D..
//C#
public interface IBindingList {
bool AllowEdit {
get;
}
}
//D2
interface IBindingList {
@property bool allowEdit();
}
Is this correct ? I think in C# AllowEdit() takes tare that you don't
implement a setter. Seems to be impossible in D.
Thanks Bjoern