System.Windows.Forms.DynamicFileByteProvider.DynamicFileByteProvider C# (CSharp) Method

DynamicFileByteProvider() public method

Constructs a new DynamicFileByteProvider instance.
public DynamicFileByteProvider ( string fileName, bool readOnly ) : System
fileName string The name of the file from which bytes should be provided.
readOnly bool
return System
        public DynamicFileByteProvider(string fileName, bool readOnly)
        {
            _fileName = fileName;

            if (!readOnly)
            {
                _fileStream = File.Open(fileName, FileMode.Open, FileAccess.ReadWrite, FileShare.Read);
            }
            else
            {
                _fileStream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
            }

            _readOnly = readOnly;

            ReInitialize();
        }

Same methods

DynamicFileByteProvider::DynamicFileByteProvider ( string fileName ) : System