C
C#2y ago
zeqd

❔ 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
Denis
Denis2y ago
Well... Docs imho should be written in English XML doc syntax is fine
Angius
Angius2y ago
If anything it's the code itself that could be improved, but yeah, docs seem fine
Denis
Denis2y ago
TryParse returns a boolean for a reason
Angius
Angius2y ago
And local variables are camelCase not PascalCase
zeqd
zeqdOP2y ago
like with small letters you need?
Angius
Angius2y ago
With camelCase So yes, first word is small summ, percent, termMonth
zeqd
zeqdOP2y ago
Thanks guys
Denis
Denis2y ago
$close
MODiX
MODiX2y ago
Use the /close command to mark a forum thread as answered
Accord
Accord2y ago
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.

Did you find this page helpful?