private string RemoveComments(string text)
{
int commentStart = text.IndexOf("/*");
if (commentStart < 0)
{
return text;
}
int commentEnd = text.IndexOf("*/", commentStart + 2);
if (commentEnd < 0)
{
return text.Substring(0, commentStart);
}
return text.Substring(0, commentStart) + " " + RemoveComments(text.Substring(commentEnd + 2));
}