C
C#14mo 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
Denis14mo ago
Well... Docs imho should be written in English XML doc syntax is fine
Angius
Angius14mo ago
If anything it's the code itself that could be improved, but yeah, docs seem fine
Denis
Denis14mo ago
TryParse returns a boolean for a reason
Angius
Angius14mo ago
And local variables are camelCase not PascalCase
zeqd
zeqdOP14mo ago
like with small letters you need?
Angius
Angius14mo ago
With camelCase So yes, first word is small summ, percent, termMonth
zeqd
zeqdOP14mo ago
Thanks guys
Denis
Denis14mo ago
$close
MODiX
MODiX14mo ago
Use the /close command to mark a forum thread as answered
Accord
Accord14mo 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.
Want results from more Discord servers?
Add your server