/// <summary>
        /// Copies the information from sourceInfo
        /// </summary>
        /// <param name="sourceInfo">The source info.</param>
        /// <param name="allFields">if set to <c>true</c> all fields are copied; otherwise the fields NrSignal, HeaderBytes and NrDataRecords are ignored.</param>
        public void CopyFrom(EdfFileInfoRaw sourceInfo, bool allFields = false)
        {
            EdfFileInfoRaw tmpInfo = sourceInfo.Clone() as EdfFileInfoRaw;

            if (tmpInfo == null)
            {
                throw new EdfException("Unable to clone file info.");
            }
            if (!allFields)
            {
                tmpInfo.NrSignals     = NrSignals.ToString();
                tmpInfo.HeaderBytes   = HeaderBytes.ToString();
                tmpInfo.NrDataRecords = NrDataRecords.ToString();
            }
            FileInfoRecord = tmpInfo;
            Modified       = true;
        }