System::Console class
Contents
[
Hide
]Console class
Provides methods for outputting data to the standard output stream. This is a static type with no instance services. You should never create instances of it by any means.
class Console
Methods
Method | Description |
---|---|
static Beep() | NOT IMPLEMENTED. |
static get_Error() | Returns a shared pointer pointing to the object that represents the standard error stream. |
static get_In() | Returns a shared pointer pointing to the object that represents the standard input stream. |
static get_Out() | Returns a shared pointer pointing to the object that represents the standard output stream. |
static Mute(bool) | Mutes or unmutes the standard output stream. |
static ReadKey() | NOT IMPLEMENTED. |
static SetError(const SharedPtr<System::IO::TextWriter>&) | Assigns the specified object to the class’ Error property. |
static SetIn(const SharedPtr<System::IO::TextReader>&) | Sets the In property to the specified TextReader object. |
static SetOut(const SharedPtr<System::IO::TextWriter>&) | Assigns the specified object to the class’ Out property. |
static Write(const SharedPtr<T>&) | Outputs the string representation of the specified object to the standard output stream. |
static Write(bool) | Outputs the string representation of bool value to the standard output stream. |
static Write(char_t) | Outputs the specified character value to the standard output stream. |
static Write(const ArrayPtr<char_t>&) | Outputs the string representation of the specified character array to the standard output stream. |
static Write(const Decimal&) | Outputs the string representation of Decimal value to the standard output stream. |
static Write(double) | Outputs the string representation of double-precision floating-point value to the standard output stream. |
static Write(float) | Outputs the string representation of single-precision floating-point value to the standard output stream. |
static Write(int32_t) | Outputs the string representation of 32-bit integer value to the standard output stream. |
static Write(int64_t) | Outputs the string representation of 64-bit integer value to the standard output stream. |
static Write(const String&) | Outputs the specified string object to the standard output stream. |
static Write(const char_t *) | Outputs the specified c-string to the standard output stream. |
static Write(const TypeInfo&) | Outputs the string representation of TypeInfo value to the standard output stream. |
static Write(uint32_t) | Outputs the string representation of unsigned 32-bit integer value to the standard output stream. |
static Write(uint64_t) | Outputs the string representation of unsigned 64-bit integer value to the standard output stream. |
static Write(const ArrayPtr<char_t>&, int32_t, int32_t) | Outputs the string representation of the specified range of the specified character array to the standard output stream. |
static Write(const String&, Args&&…) | Outputs the string representation of the specified arguments formatted according to the specified format to the standard output stream. |
static Write(const char *) | |
static WriteLine() | Outputs the current line terminator to the standard output stream. |
static WriteLine(const SharedPtr<T>&) | Outputs the string representation of the specified object followed by the current line terminator to the standard output stream. |
static WriteLine(bool) | Outputs the string representation of bool value followed by the current line terminator to the standard output stream. |
static WriteLine(char_t) | Outputs the specified character value followed by the current line terminator to the standard output stream. |
static WriteLine(const ArrayPtr<char_t>&) | Outputs the string representation of the specified character array followed by the current line terminator to the standard output stream. |
static WriteLine(const Decimal&) | Outputs the string representation of Decimal value followed by the current line terminator to the standard output stream. |
static WriteLine(double) | Outputs the string representation of double-precision floating-point value followed by the current line terminator to the standard output stream. |
static WriteLine(float) | Outputs the string representation of single-precision floating-point value followed by the current line terminator to the standard output stream. |
static WriteLine(int32_t) | Outputs the string representation of 32-bit integer value followed by the current line terminator to the standard output stream. |
static WriteLine(int64_t) | Outputs the string representation of 64-bit integer value followed by the current line terminator to the standard output stream. |
static WriteLine(const String&) | Outputs the specified string object followed by the current line terminator to the standard output stream. |
static WriteLine(const char_t *) | Outputs the specified c-string followed by the current line terminator to the standard output stream. |
static WriteLine(const TypeInfo&) | Outputs the string representation of TypeInfo value followed by the current line terminator to the standard output stream. |
static WriteLine(uint32_t) | Outputs the string representation of unsigned 32-bit integer value followed by the current line terminator to the standard output stream. |
static WriteLine(uint64_t) | Outputs the string representation of unsigned 64-bit integer value followed by the current line terminator to the standard output stream. |
static WriteLine(const ArrayPtr<char_t>&, int, int) | Outputs the string representation of the specified range of the specified character array followed by the current line terminator to the standard output stream. |
static WriteLine(const Exception&) | Outputs the string representation of the specified Exception object followed by the current line terminator to the standard output stream. |
static WriteLine(const String&, Args&&…) | Outputs the string representation of the specified arguments formatted according to the specified format followed by the current line terminator to the standard output stream. |
static WriteLine(const char *) |
Remarks
#include "system/console.h"
#include <array>
int main()
{
using namespace System;
// Print the hello message.
Console::WriteLine(u"Hello, world!");
// Create an instance of the 'std::array' class.
std::array<int, 5> arr = {1, 2, 3, 4, 5};
// Print elements of the array.
for (auto el: arr)
{
Console::Write(u"{0} ", el);
}
Console::WriteLine();
return 0;
}
/*
This code example produces the following output:
Hello, world!
1 2 3 4 5
*/
See Also
- Namespace System
- Library Aspose.Page for C++