Forex_Strategy_Builder.Language.SaveTextFile C# (CSharp) Метод

SaveTextFile() статический приватный Метод

Saves a text file
static private SaveTextFile ( string sFilePath, string sContent ) : bool
sFilePath string
sContent string
Результат bool
        static bool SaveTextFile(string sFilePath, string sContent)
        {
            bool bSuccess = false;

            try
            {
                // Pass the file path and filename to the StreamWriter Constructor
                StreamWriter sw = new StreamWriter(sFilePath);

                // Write the text
                sw.Write(sContent);

                // Close the file
                sw.Close();

                bSuccess = true;
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            return bSuccess;
        }