Search code examples
c#fileinfo

Property or indexer 'System.IO.FileInfo.Length' cannot be assigned to -- it is read only


How can i assign Property System.IO.FileInfo.Length?

FileInfo.Length Property

It is read only!


Solution

  • FileInfo.Length is used to get the size of a file, the only way to change a file size is by modifying it's content