UtilConsoleReadLine(Encoding, Int32) Method
Reads the next line of characters from the standard input stream.
This function attempts to be a improved replacement for
ReadLine function.
Namespace: DevCase.Core.Application.ConsoleAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
static member ReadLine :
encoding : Encoding *
?bufferSize : int
(* Defaults:
let _bufferSize = defaultArg bufferSize 32767
*)
-> string
No code example is currently available or this language may not be supported.
- encoding Encoding
-
Text encoding to decode the line of characters from the standard input stream.
- bufferSize Int32 (Optional)
-
The character limit to read in the next line of characters from the standard input stream.
Minimum value is: 256
Default value is: Int16 (32767)
Note that the last two characters in the buffer are reserved for
Cr + Lf.
String
The next line of characters from the input stream,
or
if no more lines are available.
This is a code example.
No code example is currently available or this language may not be supported.
' Copy very long string to clipboard.
Dim longString As New String("0", Short.MaxValue)
Clipboard.SetText(longString)
' Manually paste the string here...
Dim line As String = ConsoleUtil.ReadLine(Console.InputEncoding, bufferSize:=UShort.MaxValue)
Console.WriteLine()
Console.WriteLine($"String Length: {line.Length}")
Console.WriteLine("Press any key to exit...")
Console.ReadKey()
Environment.Exit(0)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.