How can I get the output from the following method?
public static string getLimitedWords(string str,int NumberOfWords)
{
string[] Words= str.Split(' ');
string _return=string.Empty;
if(Words.Length<=NumberOfWords)
{
_return = str;
}
else
{
for(int i=0;i<NumberOfWords;i++)
{
_return+=Words.GetValue(i).ToString()+" ";
}
}
return _return.ToString();
}