Info
Version: | 2.0.2.1 |
Author(s): | Svetlin Nakov, Ivelin Kirilov |
Last Update: | Friday, February 26, 2021 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://nakov.com/blog/2011/11/23/cin-class-for-csharp-read-from-console-nakov-io-cin/ |
NuGet Url: | https://www.nuget.org/packages/Nakov.IO.Cin |
Install
Install-Package Nakov.IO.Cin
dotnet add package Nakov.IO.Cin
paket add Nakov.IO.Cin
Nakov.IO.Cin Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
For example, in C++ we can read two integers using this code:
int x, y;
cin >> x >> y;
With Nakov.IO.Cin we can write the same code in C# like this:
int x = Cin.NextInt();
int y = Cin.NextInt();
Like in C++, the whitespace will be skipped so users can enter the input numbers on the same line, separated by spaces or on separate lines.
Nakov.IO.Cin supports reading int, double, decimal and string tokens.
Learn more at: https://github.com/nakov/Nakov.io.cin.