For Reading a line ,
Console.ReadLine();
For Writing a Line,
Console.WriteLine("...tour text...");
Sample Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter text to read: ");
string str = Console.ReadLine();
Console.WriteLine("Entered Text : ");
Console.WriteLine(str);
Console.ReadLine();
}
}
}
Console.ReadLine();
For Writing a Line,
Console.WriteLine("...tour text...");
Sample Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Enter text to read: ");
string str = Console.ReadLine();
Console.WriteLine("Entered Text : ");
Console.WriteLine(str);
Console.ReadLine();
}
}
}
No comments:
Post a Comment