using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication5
{
class Program
{
static void Main(string[] args)
{
string s1 = "Hello";
int l1 = 0;
try
{
char c;
while (true)
{
c = s1[l1];
l1++;
}
}
catch (IndexOutOfRangeException)
{
}
Console.WriteLine("The length of '{0}' is {1}", s1, l1);
Console.ReadKey();
}
}
}