namespace ConsoleApplication2 {
class Program {
static void Main(string[] args) {
string ValString;
Console.Write("Enter Your String:");
ValString = Console.ReadLine();
int x = 0;
foreach(char c in ValString) {
Console.Write(ValString[x]);
x++;
}
Console.WriteLine("\nLength Of String:{0}", (x));
Console.Read();
}
}
}Sample Output:
Enter Your String: Welcome To Csharp
Welcome To Csharp
Length Of String:17 Welcome To Csharp
