On running below program error is shown **
Unhandled Exception : systemArgumentOutofRange:Index and length must refere to location within string.
**
string input = "OneTwoThree sdfhguiosdrb asdhfuiaserthf aseiryaseuigraweui";
int size = input.Length;
if (input.Length > 30)
{
msg1 = input.Substring(0, 30);
msg2 = input.Substring(msg1.Length, size);
Console.WriteLine("Message: {0}", msg1);
Console.WriteLine("\nMessage: {0}", msg2);
}
else
Console.WriteLine(input);
Please help what I am doing wrong.