@porperty problem..

Simen kjaeraas simen.kjaras at gmail.com
Mon Jun 28 15:07:14 PDT 2010


BLS <windevguy at hotmail.de> wrote:

> Hm,  this snippet does not compile :
> class Server {
> 	private string _name, _id;
>
> 	@property servername(string name) {
> 		_name = name;
> 	}
> 	@property string servername() {
> 		return _name;
> 	}
> }
>
> remove string from @property and it works.

Maybe it's because you haven't added string to the setter? Just grasping
at straws here.

-- 
Simen


More information about the Digitalmars-d-learn mailing list