DirectoryInfo directory;
public string Name {
get { return this.directory.Name; }
set { this.directory.Name = value; }
}
Hi. I have this code in c# . It doesn’t work I get this error:
Property or Indexer System.Io.FileSystemInfo.Name cannot be assigned
to — it’s read only.
What can I do ?
I can think of three possibilities:
directoryto refer to the specified directoryWithout knowing what your property is really meant to represent, it’s hard to really say which of these options is appropriate, if any.