System::IO::StringWriter class

StringWriter class

Implements a TextWriter that writes information to a string. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class StringWriter : public System::IO::TextWriter

Methods

MethodDescription
get_Encoding() overrideReturns the currently used encoding.
virtual GetStringBuilder()Returns the currently used StringBuilder.
StringWriter(const System::SharedPtr<Text::StringBuilder>&, const IFormatProviderPtr&)Constructs a new instance of StringWriter using the specified StringBuilder and IFormatProvider.
StringWriter(const System::SharedPtr<Text::StringBuilder>&)Constructs a new instance of StringWriter using the specified StringBuilder and IFormatProvider from the current culture.
StringWriter(const IFormatProviderPtr&)Constructs a new instance of StringWriter using the specified IFormatProvider.
StringWriter()Constructs a new instance of StringWriter using IFormatProvider from the current culture.
ToString() const overrideReturns the underlying string.
Write(char_t) overrideWrites the specified character to the stream.
Write(const ArrayPtr<char_t>&, int32_t, int32_t) overrideWrites the specified subrange of characters from the specified character array to the stream.
Write(const String&) overrideWrites the specified string to the stream.

See Also