Skip to content

Commit 154b9d1

Browse files
committed
Add MySqlDecimal documentation.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent f9e4420 commit 154b9d1

File tree

7 files changed

+35
-5
lines changed

7 files changed

+35
-5
lines changed

docs/content/api/MySqlConnector/MySqlDecimal/ToDouble.md

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/api/MySqlConnector/MySqlDecimal/ToString.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/api/MySqlConnector/MySqlDecimal/Value.md

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/api/MySqlConnector/MySqlDecimalType.md

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/api/MySqlConnectorAssembly.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/content/api/MySqlConnectorNamespace.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/MySqlConnector/MySqlDecimal.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,26 @@
44

55
namespace MySqlConnector;
66

7+
/// <summary>
8+
/// <see cref="MySqlDecimal"/> represents a MySQL <c>DECIMAL</c> value that is too large to fit in a .NET <see cref="decimal"/>.
9+
/// </summary>
710
public readonly struct MySqlDecimal
811
{
12+
/// <summary>
13+
/// Gets the value of this <see cref="MySqlDecimal"/> as a <see cref="decimal"/>.
14+
/// </summary>
15+
/// <remarks>This method will throw an <see cref="OverflowException"/> if the value is too large to be represented.</remarks>
916
public decimal Value => decimal.Parse(m_value, CultureInfo.InvariantCulture);
1017

18+
/// <summary>
19+
/// Gets the value of this <see cref="MySqlDecimal"/> as a <see cref="double"/>.
20+
/// </summary>
21+
/// <remarks>The return value may have lost precision.</remarks>
1122
public double ToDouble() => double.Parse(m_value, CultureInfo.InvariantCulture);
1223

24+
/// <summary>
25+
/// Gets the original value of this <see cref="MySqlDecimal"/> as a <see cref="string"/>.
26+
/// </summary>
1327
public override string ToString() => m_value;
1428

1529
internal MySqlDecimal(string value)

0 commit comments

Comments
 (0)