decoding is done.. but have some problem in encoding.. plz see the code..
this is decode...
/* public static string Decode(string s1, string s2)
{
int j;
while (s1.IndexOf(s2)!=-1)
{
j = s1.IndexOf(s2);
s1 = s1.Remove(j, s2.Length);
}
return s1;
}*/
Problem is here...
public static string Encode(string s4, string s5)
{
Random rnd = new Random();
int j = rnd.Next(20);
for (int i = 0; i < s4.Length; i++)
{
s4 = s4 + s5;//this will run infinite time bec i m increasing string length...
}
return s4;
}
any idea.... thanks
Mod Edit: Please use code tags when posting your code. Code tags are used like so =>
Thanks,
PsychoCoder

New Topic/Question
Reply




MultiQuote




|