Comment puis-je obtenir la sortie de la méthode suivante?Récupérer la sortie de la méthode
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();
}
Que signifie "afficher la méthode"? –
Afficher où? Avez-vous une autre question? – leppie
Jordie91 ne semble pas être un anglophone natif; il est hautement probable que "display" est la traduction littérale d'un mot néerlandais ... –