Added exceptions that DivRem raises by andanteyk · Pull Request #12354 · dotnet/dotnet-api-docs

Conversation

@andanteyk

Summary

Added exceptions (especially OverflowException) that Math.DivRem or Int***.DivRem raise.

From dotnet/runtime#124932

@dotnet-policy-service

Tagging subscribers to this area: @dotnet/area-system-runtime

@tannergooding

Could you update the unsigned integer ones to include the DivideByZeroException as well?

Would probably also be good to cover BigInteger and IBinaryInteger, but otherwise changes LGTM

tannergooding

gewarren

<remarks>To be added.</remarks>
<inheritdoc cref="M:System.Numerics.IBinaryInteger`1.DivRem(`0,`0)" />
<exception cref="T:System.DivideByZeroException">
<paramref name="right" /> is zero.</exception>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<paramref name="right" /> is zero.</exception>
<paramref name="right" /> is 0.</exception>

@tannergooding Wouldn't 0 be better than zero here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no preference. There are times where I think zero is more readable and others where I think 0 is instead.

Labels