❔ XML documentation
Hi guys. Who can check for the correctness of writing XML documentation (there are a couple of lines of code)
/// <summary>Вычисляет будущую стоимость инвестиции на основе введенных данных.</summary>
/// <param name="userInput">Строка ввода, содержащая сумму, процентную ставку и срок инвестиции.</param>
/// <returns>Накопившаяся сумма на момент окончания вклада.</returns>
public static double Calculate(string userInput)
{
string[] inputParts = userInput.Split(' ');
double.TryParse(inputParts[0], out var Summ);
double.TryParse(inputParts[1], out var Percent);
int.TryParse(inputParts[2], out var TermMonth);
return Summ * Math.Pow((1 + ((Percent / 100) / 12)), TermMonth);
}
10 Replies
Well... Docs imho should be written in English
XML doc syntax is fine
If anything it's the code itself that could be improved, but yeah, docs seem fine
TryParse returns a boolean for a reason
And local variables are
camelCase
not PascalCase
like with small letters you need?
With
camelCase
So yes, first word is small
summ
, percent
, termMonth
Thanks guys
$close
Use the /close command to mark a forum thread as answered
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.