Did you try anything?
It would be a simple for loop with an if. Something like:
public int GetNthOccurenceIndex(string sample, char t, int nth)
{
int count = 0;
for (int i = 0; i < sample.Length; i++)
{
if (sample[i] == t)
{
count++;
if (count == nth)
return i;
}
}
return -1;
}