Пример #1
0
 /// <summary>Write a line to the stream, if it was opened for writing.</summary>
 /// <description>
 /// There is no limit as to what kind of data you can write. Any format and data is allowable, not just text. Be careful of what you write, as whitespace, current values, and literals will be preserved.
 /// </description>
 /// <param name="line">The data we are writing out to file.</param>
 /// <code>
 /// // Create a file stream
 /// %fsObject = new FileStreamObject();
 ///
 /// // Open the file for writing
 /// // If it does not exist, it is created. If it does exist, the file is cleared
 /// %fsObject.open("./test.txt", "write");
 ///
 /// // Write a line to the file
 /// %fsObject.writeLine("Hello World");
 ///
 /// // Write another line to the file
 /// %fsObject.writeLine("Documentation Rocks!");
 ///
 /// // Always remember to close a file stream when finished
 /// %fsObject.close();
 /// </code>
 /// <see cref="readLine()" />
 public void WriteLine(string line)
 {
     InternalUnsafeMethods.WriteLine__Args _args = new InternalUnsafeMethods.WriteLine__Args()
     {
         line = line,
     };
     InternalUnsafeMethods.WriteLine()(ObjectPtr, _args);
 }
Пример #2
0
 /// <summary>Write a line to the file, if it was opened for writing.</summary>
 /// <description>
 /// There is no limit as to what kind of text you can write. Any format and data is allowable, not just text. Be careful of what you write, as whitespace, current values, and literals will be preserved.
 /// </description>
 /// <param name="text">The data we are writing out to file.</param>
 /// <code>
 /// // Create a file object for writing
 /// %fileWrite = new FileObject();
 ///
 /// // Open a file to write to, if it does not exist it will be created
 /// %fileWrite.OpenForWrite("./test.txt");
 ///
 /// // Write a line to the text files
 /// %fileWrite.writeLine("READ. READ CODE. CODE");
 /// </code>
 /// <returns>True if file was successfully opened, false otherwise</returns>
 public void WriteLine(string text)
 {
     InternalUnsafeMethods.WriteLine__Args _args = new InternalUnsafeMethods.WriteLine__Args()
     {
         text = text,
     };
     InternalUnsafeMethods.WriteLine()(ObjectPtr, _args);
 }