using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace reoccuringletterstring
{
class Program
{
static bool checkString(string str,int len)
{
int i;
bool flag=true;
for(i=len-2;i>=0;i--)
{
if (str[i] == str[len - 1])
flag = false;
}
if(len!=0)
checkString(str,len-1);
return flag;
}
static void Main(string[] args)
{
string str1="true";
string str2 = "foo";
string str3 = "tofol";
//bool val=checkString(str1,str1.Length);
//val=checkString(str2,str2.Length);
bool val=checkString(str3,str3.Length);
}
}
}
This is program to check for reoccurrence of a character in a string
But the call stack is returning value of last pop call
I want to use value of 1st pop
is there any way to break in between call stack