This documentation is archived and is not being maintained.

Encoding cannot be set to Nothing

Visual Studio 2008

An attempt to read from or write to a file has failed because the parameter encoding has been set to Nothing but requires a valid value.

Encoding is used to determine what encoding to use when writing to a file. The default is UTF-8.

To correct this error

  • Supply a valid value for the encoding parameter.

Show: