using System;
public class Program
{
public static void Main()
string s = "Smith";
int startIndex = 1; //This is the first character that I want to output
int endIndex = 3; //This is the last character that I want to output
string subOfs = s.Substring(startIndex, endIndex);
Console.WriteLine("Substring is '{0}'.", subOfs);
Console.ReadLine();
}