Ejemplo n.º 1
0
        /// <summary>
        /// Method reads data from file.
        /// </summary>
        /// <param name="filePath">Path to the file.</param>
        /// <returns></returns>
        private String _ReadDataFromFile(String filePath)
        {
            String Text = String.Empty;
            //check file info
            FileInfo fi = new FileInfo(filePath);

            if (fi.Exists == true)
            {
                FileWorker fw = new FileWorker();
                Text = fw.ReadFromFile(filePath);
            }
            return(Text);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Method reads data from file.
        /// </summary>
        /// <param name="filePath">Path to the file.</param>
        /// <returns></returns>
        private String _ReadDataFromFile(String filePath)
        {
            String Text = String.Empty;
            //check file info
            FileInfo fi = new FileInfo(filePath);

            if(fi.Exists == true)
            {

                    FileWorker fw = new FileWorker();
                    Text = fw.ReadFromFile(filePath);
            }
            return Text;
        }