Say you have the line "This is a test"
I pass it to the zee method, for example ("This is a test", 1) and want to "test This is a";
I pass it to the zee method, for example ("This is a test", 2) and want to "test It",
the number may exceed common words in a variable. If so, he should go in cycles.
I started with ....
public static string zee(string origString, int i)
{
StringBuilder sb = new StringBuilder();
ArrayList list = new ArrayList();
list.AddRange(origString.Split(' '));
for (int c = i; c < (list.Count + i); c++)
{
sb.AppendFormat("{0} ", list[c]);
}
return sb.ToString();
}
source
share