@property and interfaces

BLS windevguy at hotmail.de
Tue Jun 29 03:11:34 PDT 2010


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


More information about the Digitalmars-d-learn mailing list