Implementing Substring in C#
Assorted things pop into my head here.


What's wrong with using the String.Substring(Int32) method?
At first glance, I would tend to think your 2nd method would be faster, but they really aren't the same.  If input i is greater than test.Length, the 2nd method will throw an exception but the first method would return an empty string.
I'd suggest having the test string be the first parameter since it's really the object that you are processing upon.  Plus you could then make them static extension methods to the input string.


EDIT - Adding extension method:

namespace System
{
    public static class GiladStrExt
    {
        public static string ApplySubString(this string value, int startIndex)
        {
            // You can invoke an extension method as a straight-up call,
            // e.g. GiladStrExt.ApplySubString(test, 5) and the value
            // for test could be null.
            if (value == null) throw new ArgumentNullException("value");
            if ((value.Length == 0) &amp;&amp; (startIndex == 0)) return string.Empty;
            // Usually one uses the extension method with non-null values
            // so all we need to worry about is startIndex compared to value.Length.
            if ((startIndex &lt; 0) || (startIndex &gt;= value.Length)) throw new ArgumentOutOfRangeException("startIndex");
            var sb = new StringBuilder();
            for (int i = startIndex; i &lt; value.Length; i++)
            {
                sb.Append(value[i]);
            }
            return sb.ToString();
        }
    }
}