I've come across an example tutorial online and saw a property for a class written like this for a wpf project. I was wondering what this would translate to in simpler terms since i've never seen a class written like this before.
Is the translation i attempted correct? Meaning is it doing the same thing the tutorial class is doing?
Tutorial Class
public ObservableCollection<string> Directories
{
get { return Get<ObservableCollection<string>>(); }
set { Set(value); }
}
My attempted guess at what it would be written as
private ObservableCollection<string> _directories;
public ObservableCollection<string> Directories
{
get
{
return this._directories;
}
set
{
this._directories= value;
}
}