CSKernelFile.cFile.read C# (CSharp) Method

read() public method

public read ( string &text, bool &eof ) : bool
text string
eof bool
return bool
        public bool read(out string text, out bool eof)
        {
            text = "";
            eof = false;
            if (!m_open) return false;
            try
            {

                if (m_tr == null)
                {
                    m_tr = new StreamReader(m_file);
                }

                text = m_tr.ReadLine();
                if (text == null)
                {
                    eof = true;
                    text = "";
                    m_tr.Close();
                    m_tr = null;
                }
                return true;
            }
            catch (Exception ex)
            {
                cError.mngError(ex, "read", c_module, "failed reading text from file: " + m_path + Path.DirectorySeparatorChar + m_name);
                return false;
            }
        }