public String IP { get; }
When I specify get only I wont be able to set the property even inside the class itself. e.g
this.IP = "127.0.0.1";
Property or indexer 'IP' cannot be assigned to -- it is readonlySolution, just type private keyword with set property like this
public String IP { get; private set; }All done
No comments:
Post a Comment