From bd96a17e8e6f36a395fd539866fd89f99055ac5b Mon Sep 17 00:00:00 2001
From: albert-du <52804499+albert-du@users.noreply.github.com>
Date: Tue, 18 Jan 2022 16:56:14 -0800
Subject: [PATCH 1/5] Decimal F# snippets
---
.../Decimal Example/FS/fs.fsproj | 9 ++
.../Decimal Example/FS/source.fs | 75 +++++++++
.../System.Decimal.Compare/fs/Compare1.fs | 29 ++++
.../System.Decimal.Compare/fs/fs.fsproj | 9 ++
.../FS/cfromchar.fs | 20 +++
.../FS/cfromdouble.fs | 51 +++++++
.../FS/cfromsingle.fs | 52 +++++++
.../FS/fs.fsproj | 11 ++
.../FS/cfromint16.fs | 21 +++
.../FS/cfromint32.fs | 21 +++
.../FS/cfromint64.fs | 19 +++
.../FS/cfromsbyte.fs | 21 +++
.../FS/fs.fsproj | 12 ++
.../FS/cfrombyte.fs | 21 +++
.../FS/cfromuint16.fs | 21 +++
.../FS/cfromuint32.fs | 21 +++
.../FS/cfromuint64.fs | 21 +++
.../FS/fs.fsproj | 12 ++
.../System.Decimal.ConvTo/FS/ctochar.fs | 33 ++++
.../System.Decimal.ConvTo/FS/ctos_byte.fs | 32 ++++
.../System.Decimal.ConvTo/FS/ctosgl_dbl.fs | 29 ++++
.../System.Decimal.ConvTo/FS/ctou_int16.fs | 65 ++++++++
.../System.Decimal.ConvTo/FS/ctou_int32.fs | 65 ++++++++
.../System.Decimal.ConvTo/FS/ctou_int64.fs | 65 ++++++++
.../System.Decimal.ConvTo/FS/fs.fsproj | 14 ++
.../System.Decimal.Divide/fs/Divide1.fs | 22 +++
.../System.Decimal.Divide/fs/fs.fsproj | 9 ++
.../System.Decimal.Round/fs/Round1.fs | 31 ++++
.../System.Decimal.Round/fs/Round12.fs | 38 +++++
.../System.Decimal.Round/fs/fs.fsproj | 10 ++
.../system.Decimal.Ceiling/fs/ceiling1.fs | 24 +++
.../system.Decimal.Ceiling/fs/fs.fsproj | 9 ++
.../fs/DecimalDivision_46630_1.fs | 20 +++
.../system.Decimal.Class/fs/fs.fsproj | 9 ++
.../FS/comp_equal.fs | 62 ++++++++
.../FS/cto_eq_obj.fs | 76 ++++++++++
.../FS/fs.fsproj | 10 ++
.../system.Decimal.Ctor.Arrays/FS/ctoriarr.fs | 90 +++++++++++
.../FS/ctoriiibby.fs | 87 +++++++++++
.../system.Decimal.Ctor.Arrays/FS/fs.fsproj | 10 ++
.../system.Decimal.Ctor.Ints/FS/ctori.fs | 41 +++++
.../system.Decimal.Ctor.Ints/FS/ctorl.fs | 40 +++++
.../system.Decimal.Ctor.Ints/FS/ctorui.fs | 41 +++++
.../system.Decimal.Ctor.Ints/FS/ctorul.fs | 41 +++++
.../system.Decimal.Ctor.Ints/FS/fs.fsproj | 12 ++
.../system.Decimal.Ctor.Reals/FS/ctordo.fs | 54 +++++++
.../system.Decimal.Ctor.Reals/FS/ctors.fs | 67 +++++++++
.../system.Decimal.Ctor.Reals/FS/fs.fsproj | 10 ++
.../system.Decimal.Fields/FS/fields.fs | 42 ++++++
.../system.Decimal.Fields/FS/fs.fsproj | 9 ++
.../FS/floor_neg_trunc.fs | 61 ++++++++
.../FS/fs.fsproj | 9 ++
.../FS/fs.fsproj | 10 ++
.../FS/getbits.fs | 41 +++++
.../FS/gettypecode.fs | 22 +++
.../system.Decimal.Mul_Div_Rem/FS/fs.fsproj | 9 ++
.../FS/mul_div_rem.fs | 71 +++++++++
.../FS/fromoacurrency.fs | 56 +++++++
.../system.Decimal.OACurrency/FS/fs.fsproj | 10 ++
.../FS/tooacurrency.fs | 69 +++++++++
.../system.Decimal.Parse/FS/fs.fsproj | 9 ++
.../system.Decimal.Parse/FS/parse.fs | 127 ++++++++++++++++
.../system.Decimal.ToString/FS/ToString2.fs | 122 +++++++++++++++
.../system.Decimal.ToString/FS/fs.fsproj | 9 ++
.../system.Decimal.ToXXX/FS/fs.fsproj | 9 ++
.../system.Decimal.ToXXX/FS/tosgl_dbl.fs | 55 +++++++
.../system.Decimal.TryParse/fs/TryParse.fs | 93 ++++++++++++
.../system.Decimal.TryParse/fs/fs.fsproj | 9 ++
.../system.decimal.ctor/fs/ctor2a.fs | 16 ++
.../system.decimal.ctor/fs/fs.fsproj | 9 ++
.../system.decimal.equals/fs/equalsoverl.fs | 78 ++++++++++
.../system.decimal.equals/fs/fs.fsproj | 9 ++
.../fs/fs.fsproj | 10 ++
.../fs/tosbyte.fs | 30 ++++
.../fs/tosingle1.fs | 29 ++++
.../system.decimal.operators/fs/addition1.fs | 11 ++
.../system.decimal.operators/fs/decrement1.fs | 11 ++
.../system.decimal.operators/fs/decrement2.fs | 13 ++
.../system.decimal.operators/fs/division1.fs | 11 ++
.../system.decimal.operators/fs/equality1.fs | 17 +++
.../system.decimal.operators/fs/fs.fsproj | 23 +++
.../fs/greaterthan1.fs | 17 +++
.../fs/greaterthanorequal1.fs | 17 +++
.../system.decimal.operators/fs/increment1.fs | 13 ++
.../system.decimal.operators/fs/increment2.fs | 13 ++
.../fs/inequality1.fs | 17 +++
.../system.decimal.operators/fs/lessthan1.fs | 17 +++
.../fs/lessthanorequal1.fs | 17 +++
.../system.decimal.operators/fs/modulus1.fs | 11 ++
.../system.decimal.operators/fs/multiply1.fs | 11 ++
.../fs/subtraction1.fs | 11 ++
.../system.decimal.remainder/fs/fs.fsproj | 9 ++
.../system.decimal.remainder/fs/remainder.fs | 22 +++
.../system.decimal.tobyte/fs/fs.fsproj | 9 ++
.../system.decimal.tobyte/fs/tobyte_1.fs | 29 ++++
.../system.decimal.toint16/fs/fs.fsproj | 9 ++
.../system.decimal.toint16/fs/toint16_1.fs | 29 ++++
.../system.decimal.toint32/fs/fs.fsproj | 9 ++
.../system.decimal.toint32/fs/toint32_1.fs | 30 ++++
.../system.decimal.toint64/fs/fs.fsproj | 9 ++
.../system.decimal.toint64/fs/toint64_1.fs | 31 ++++
.../system.decimal.tosbyte/fs/fs.fsproj | 9 ++
.../system.decimal.tosbyte/fs/tosbyte1.fs | 29 ++++
.../system.decimal.touint16/fs/fs.fsproj | 9 ++
.../system.decimal.touint16/fs/touint16_1.fs | 29 ++++
.../system.decimal.touint32/fs/fs.fsproj | 9 ++
.../system.decimal.touint32/fs/touint32_1.fs | 30 ++++
.../system.decimal.touint64/fs/fs.fsproj | 9 ++
.../system.decimal.touint64/fs/touint64_1.fs | 31 ++++
.../system.math.round.overload/fs/fs.fsproj | 10 ++
.../fs/midpoint1.fs | 28 ++++
.../system.math.round.overload/fs/mpr.fs | 78 ++++++++++
xml/System/Decimal.xml | 142 +++++++++++++++---
113 files changed, 3393 insertions(+), 21 deletions(-)
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs
create mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
new file mode 100644
index 00000000000..2bd5e7e8d50
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Library
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs b/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs
new file mode 100644
index 00000000000..9a97ae8bee5
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs
@@ -0,0 +1,75 @@
+module snippets
+
+open System
+
+module snippet1 =
+ //
+ ///
+ /// Keeping my fortune in Decimals to avoid the round-off errors.
+ ///
+ type PiggyBank() =
+ let mutable myFortune = 0m
+
+ member _.AddPenny() =
+ myFortune <- Decimal.Add(myFortune, 0.01m)
+
+ member _.Capacity =
+ Decimal.MaxValue
+
+ member _.Dollars =
+ Decimal.Floor myFortune
+
+ member _.Cents =
+ Decimal.Subtract(myFortune, Decimal.Floor myFortune)
+
+ override _.ToString() =
+ $"{myFortune:C} in piggy bank"
+ //
+
+module snippet2 =
+ //
+ type PiggyBank() =
+ let mutable myFortune = 0m
+
+ member _.Capacity =
+ Decimal.MaxValue
+
+ member _.AddPenny() =
+ myFortune <- myFortune + 0.01m
+ //
+
+module snippet3 =
+ //
+ type PiggyBank() =
+ let mutable myFortune = 0m
+
+ member _.Dollars =
+ Decimal.Floor myFortune
+
+ member _.AddPenny() =
+ myFortune <- myFortune + 0.01m
+ //
+
+module snippet4 =
+ //
+ type PiggyBank() =
+ let mutable myFortune = 0m
+
+ member _.Cents =
+ Decimal.Subtract(myFortune, Decimal.Floor myFortune)
+
+ member _.AddPenny() =
+ myFortune <- myFortune + 0.01m
+ //
+
+module snippet5 =
+ //
+ type PiggyBank() =
+ let mutable myFortune = 0m
+
+ member _.AddPenny() =
+ myFortune <- Decimal.Add(myFortune, 0.01m)
+
+ override _.ToString() =
+ $"{myFortune:C} in piggy bank"
+ //
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs
new file mode 100644
index 00000000000..413a3a01afd
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs
@@ -0,0 +1,29 @@
+//
+open System
+
+type Relationship =
+ | LessThan = -1
+ | Equals = 0
+ | GreaterThan = 1
+
+[]
+let main _ =
+ let value1 = Decimal.MaxValue
+ let value2 = value1 - 0.01m
+ printfn $"{value1} {Decimal.Compare(value1, value2) |> enum} {value2}"
+
+ let value2 = value1 / 12m - 0.1m
+ let value1 = value1 / 12m
+ printfn $"{value1} {Decimal.Compare(value1, value2) |> enum} {value2}"
+
+ let value1 = value1 - 0.2m
+ let value2 = value2 + 0.1m
+ printfn $"{value1} {Decimal.Compare(value1, value2) |> enum} {value2}"
+
+ 0
+
+// The example displays the following output:
+// 79228162514264337593543950335 Equals 79228162514264337593543950335
+// 6602346876188694799461995861.2 GreaterThan 6602346876188694799461995861.1
+// 6602346876188694799461995861.0 LessThan 6602346876188694799461995861.2
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj
new file mode 100644
index 00000000000..65ed4b65243
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs
new file mode 100644
index 00000000000..1605c23b094
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs
@@ -0,0 +1,20 @@
+module cfromchar
+
+//
+// Define a list of Char values.
+let values = [ '\000'; ' '; '*'; 'A'; 'a'; '{'; 'Æ' ]
+
+// Convert each Char value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"'{value}' ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// ' ' (Char) --> 0 (Decimal)
+// ' ' (Char) --> 32 (Decimal)
+// '*' (Char) --> 42 (Decimal)
+// 'A' (Char) --> 65 (Decimal)
+// 'a' (Char) --> 97 (Decimal)
+// '{' (Char) --> 123 (Decimal)
+// 'Æ' (Char) --> 198 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs
new file mode 100644
index 00000000000..93d59e8a87f
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs
@@ -0,0 +1,51 @@
+module cfromdouble
+
+//
+// Example of the explicit conversion from double to decimal.
+let print obj1 obj2 = printfn $"{obj1,25:E16}{obj2,33}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Convert the double argument; catch exceptions that are thrown.
+let decimalFromDouble (argument: double) =
+ // Convert the double argument to a decimal value.
+ try
+ decimal argument
+ |> print argument
+ with ex ->
+ getExceptionType ex
+ |> print argument
+
+
+printfn "This example of the explicit conversion from double to decimal \ngenerates the following output.\n"
+print "double argument" "decimal value"
+print "---------------" "-------------"
+
+// Convert double values and display the results.
+decimalFromDouble 1.234567890123E-30
+decimalFromDouble 1.2345678901234E-25
+decimalFromDouble 1.23456789012345E-20
+decimalFromDouble 1.234567890123456E-10
+decimalFromDouble 1.2345678901234567
+decimalFromDouble 1.23456789012345678E+12
+decimalFromDouble 1.234567890123456789E+28
+decimalFromDouble 1.234567890123456789E+30
+
+
+// This example of the explicit conversion from double to decimal
+// generates the following output.
+
+// double argument decimal value
+// --------------- -------------
+// 1.2345678901230000E-030 0
+// 1.2345678901233999E-025 0.0000000000000000000000001235
+// 1.2345678901234499E-020 0.0000000000000000000123456789
+// 1.2345678901234560E-010 0.000000000123456789012346
+// 1.2345678901234567E+000 1.23456789012346
+// 1.2345678901234568E+012 1234567890123.46
+// 1.2345678901234568E+028 12345678901234600000000000000
+// 1.2345678901234569E+030 OverflowException
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs
new file mode 100644
index 00000000000..eac9d5e9e6c
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs
@@ -0,0 +1,52 @@
+module cfromsingle
+
+//
+// Example of the explicit conversion from float to decimal.
+open System
+
+let print obj1 obj2 = printfn $"{obj1,16:E7}{obj2,33}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Convert the float argument; catch exceptions that are thrown.
+let decimalFromSingle (argument: float32) =
+ // Convert the float argument to a decimal value.
+ try
+ decimal argument
+ |> print argument
+ with ex ->
+ getExceptionType ex
+ |> print argument
+
+printfn "This example of the explicit conversion from float to decimal \ngenerates the following output.\n"
+print "float argument" "decimal value"
+print "--------------" "-------------"
+
+// Convert float values and display the results.
+decimalFromSingle 1.2345E-30f
+decimalFromSingle 1.2345E-26f
+decimalFromSingle 1.23456E-22f
+decimalFromSingle 1.23456E-12f
+decimalFromSingle 1.234567f
+decimalFromSingle 1.234567E+12f
+decimalFromSingle 1.2345678E+28f
+decimalFromSingle 1.2345678E+30f
+
+
+// This example of the explicit conversion from float to decimal
+// generates the following output.
+//
+// float argument decimal value
+// -------------- -------------
+// 1.2345000E-030 0
+// 1.2345000E-026 0.0000000000000000000000000123
+// 1.2345600E-022 0.000000000000000000000123456
+// 1.2345600E-012 0.00000000000123456
+// 1.2345671E+000 1.234567
+// 1.2345670E+012 1234567000000
+// 1.2345678E+028 12345680000000000000000000000
+// 1.2345678E+030 OverflowException
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
new file mode 100644
index 00000000000..96cadbddfaa
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
@@ -0,0 +1,11 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs
new file mode 100644
index 00000000000..899cbdfd13b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs
@@ -0,0 +1,21 @@
+module cfromint16
+
+//
+open System
+
+// Define a list of 16-bit integer values.
+let values =
+ [ Int16.MinValue; Int16.MaxValue; 0xFFFs; 12345s; -10000s ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// -32768 (Int16) --> -32768 (Decimal)
+// 32767 (Int16) --> 32767 (Decimal)
+// 4095 (Int16) --> 4095 (Decimal)
+// 12345 (Int16) --> 12345 (Decimal)
+// -10000 (Int16) --> -10000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs
new file mode 100644
index 00000000000..a7642e5e90e
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs
@@ -0,0 +1,21 @@
+module cfromint32
+
+//
+open System
+
+// Define a list of 32-bit integer values.
+let values =
+ [ Int32.MinValue; Int32.MaxValue; 0xFFFFFF; 123456789; -1000000000 ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// -2147483648 (Int32) --> -2147483648 (Decimal)
+// 2147483647 (Int32) --> 2147483647 (Decimal)
+// 16777215 (Int32) --> 16777215 (Decimal)
+// 123456789 (Int32) --> 123456789 (Decimal)
+// -1000000000 (Int32) --> -1000000000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs
new file mode 100644
index 00000000000..d9651ecdb9e
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs
@@ -0,0 +1,19 @@
+//
+open System
+
+// Define a list of 64-bit integer values.
+let values =
+ [ Int64.MinValue; Int64.MaxValue; 0xFFFFFFFFFFFFL; 123456789123456789L; -1000000000000000L ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// -9223372036854775808 (Int64) --> -9223372036854775808 (Decimal)
+// 9223372036854775807 (Int64) --> 9223372036854775807 (Decimal)
+// 281474976710655 (Int64) --> 281474976710655 (Decimal)
+// 123456789123456789 (Int64) --> 123456789123456789 (Decimal)
+// -1000000000000000 (Int64) --> -1000000000000000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs
new file mode 100644
index 00000000000..4adc2137b5f
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs
@@ -0,0 +1,21 @@
+module cfromsbyte
+
+//
+open System
+
+// Define a list of 8-bit signed integer values.
+let values =
+ [ SByte.MinValue; SByte.MaxValue; 0x3Fy; 123y; -100y ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// -128 (SByte) --> -128 (Decimal)
+// 127 (SByte) --> 127 (Decimal)
+// 63 (SByte) --> 63 (Decimal)
+// 123 (SByte) --> 123 (Decimal)
+// -100 (SByte) --> -100 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
new file mode 100644
index 00000000000..3ff0cabf480
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
@@ -0,0 +1,12 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs
new file mode 100644
index 00000000000..f2368a8a6e4
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs
@@ -0,0 +1,21 @@
+module cfrombyte
+
+//
+open System
+
+// Define a list of byte values.
+let values =
+ [ Byte.MinValue; Byte.MaxValue; 0x3Fuy; 123uy; 200uy ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// 0 (Byte) --> 0 (Decimal)
+// 255 (Byte) --> 255 (Decimal)
+// 63 (Byte) --> 63 (Decimal)
+// 123 (Byte) --> 123 (Decimal)
+// 200 (Byte) --> 200 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs
new file mode 100644
index 00000000000..e98b3436632
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs
@@ -0,0 +1,21 @@
+module cfromuint16
+
+//
+open System
+
+// Define a list of 16-bit unsigned integer values.
+let values =
+ [ UInt16.MinValue; UInt16.MaxValue; 0xFFFus; 12345us; 40000us ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// 0 (UInt16) --> 0 (Decimal)
+// 65535 (UInt16) --> 65535 (Decimal)
+// 4095 (UInt16) --> 4095 (Decimal)
+// 12345 (UInt16) --> 12345 (Decimal)
+// 40000 (UInt16) --> 40000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs
new file mode 100644
index 00000000000..96816201da6
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs
@@ -0,0 +1,21 @@
+module cfromuint32
+
+//
+open System
+
+// Define a list of 32-bit unsigned integer values.
+let values =
+ [ UInt32.MinValue; UInt32.MaxValue; 0xFFFFFFu; 123456789u; 4000000000u ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// 0 (UInt32) --> 0 (Decimal)
+// 4294967295 (UInt32) --> 4294967295 (Decimal)
+// 16777215 (UInt32) --> 16777215 (Decimal)
+// 123456789 (UInt32) --> 123456789 (Decimal)
+// 4000000000 (UInt32) --> 4000000000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs
new file mode 100644
index 00000000000..611ff438f72
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs
@@ -0,0 +1,21 @@
+module cfromuint64
+
+//
+open System
+
+// Define a list of 64-bit unsigned integer values.
+let values =
+ [ UInt64.MinValue; UInt64.MaxValue; 0xFFFFFFFFFFFFuL; 123456789123456789uL; 1000000000000000uL ]
+
+// Convert each value to a Decimal.
+for value in values do
+ let decValue: decimal = value
+ printfn $"{value} ({value.GetType().Name}) --> {decValue} ({decValue.GetType().Name})"
+
+// The example displays the following output:
+// 0 (UInt64) --> 0 (Decimal)
+// 18446744073709551615 (UInt64) --> 18446744073709551615 (Decimal)
+// 281474976710655 (UInt64) --> 281474976710655 (Decimal)
+// 123456789123456789 (UInt64) --> 123456789123456789 (Decimal)
+// 1000000000000000 (UInt64) --> 1000000000000000 (Decimal)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj
new file mode 100644
index 00000000000..3745d7091a5
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj
@@ -0,0 +1,12 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs
new file mode 100644
index 00000000000..a65e5948e72
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs
@@ -0,0 +1,33 @@
+module ctochar
+
+//
+open System
+
+// Define a list of decimal values.
+let values =
+ [ 3.33m; 55.5m; 77.7m; 123m; 123.999m; 170m; 188.88m; 222m; 244m; 8217m; 8250m; 65536m; -1m ]
+
+// Convert each value to a Char.
+for value in values do
+ try
+ let charValue = char value
+ printfn $"{value} --> {charValue} ({uint16 charValue:X4})"
+
+ with :? OverflowException ->
+ printfn $"OverflowException: Cannot convert {value}"
+
+// The example displays the following output:
+// 3.33 --> ? (0003)
+// 55.5 --> 7 (0037)
+// 77.7 --> M (004D)
+// 123 --> { (007B)
+// 123.999 --> { (007B)
+// 170 --> ª (00AA)
+// 188.88 --> ¼ (00BC)
+// 222 --> _ (00DE)
+// 244 --> ô (00F4)
+// 8217 --> ' (2019)
+// 8250 --> > (203A)
+// OverflowException: Cannot convert 65536
+// OverflowException: Cannot convert -1
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs
new file mode 100644
index 00000000000..b5a22e4987e
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs
@@ -0,0 +1,32 @@
+module ctos_byte
+
+//
+open System
+
+// Define a list of decimal values.
+let values =
+ [ 78m; Decimal(78000, 0, 0, false, 3uy)
+ 78.999m; 255.999m; 256m; 127.999m
+ 128m; -0.999m; -1m; -128.999m; -129m ]
+
+for value in values do
+ try
+ let byteValue = byte value
+ printfn $"{value} ({value.GetType().Name}) --> {byteValue} ({byteValue.GetType().Name})"
+
+ with :? OverflowException ->
+ printfn $"OverflowException: Cannot convert {value}"
+
+// The example displays the following output:
+// 78 (Decimal) --> 78 (Byte)
+// 78.000 (Decimal) --> 78 (Byte)
+// 78.999 (Decimal) --> 78 (Byte)
+// 255.999 (Decimal) --> 255 (Byte)
+// OverflowException: Cannot convert 256
+// 127.999 (Decimal) --> 127 (Byte)
+// 128 (Decimal) --> 128 (Byte)
+// -0.999 (Decimal) --> 0 (Byte)
+// OverflowException: Cannot convert -1
+// OverflowException: Cannot convert -128.999
+// OverflowException: Cannot convert -129
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs
new file mode 100644
index 00000000000..37a1c8a1fab
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs
@@ -0,0 +1,29 @@
+module ctosgl_dbl
+
+//
+open System
+
+// Define a list of decimal values.
+let values =
+ [ 0.0000000000000000000000000001M
+ 0.0000000000123456789123456789M
+ 123M; Decimal(123000000, 0, 0, false, 6uy)
+ 123456789.123456789M
+ 123456789123456789123456789M
+ Decimal.MinValue; Decimal.MaxValue ]
+
+// Convert each value to a double.
+for value in values do
+ let dblValue = double value
+ printfn $"{value} ({value.GetType().Name}) --> {dblValue} ({dblValue.GetType().Name})"
+
+// The example displays the following output:
+// 0.0000000000000000000000000001 (Decimal) --> 1E-28 (Double)
+// 0.0000000000123456789123456789 (Decimal) --> 1.23456789123457E-11 (Double)
+// 123 (Decimal) --> 123 (Double)
+// 123.000000 (Decimal) --> 123 (Double)
+// 123456789.123456789 (Decimal) --> 123456789.123457 (Double)
+// 123456789123456789123456789 (Decimal) --> 1.23456789123457E+26 (Double)
+// -79228162514264337593543950335 (Decimal) --> -7.92281625142643E+28 (Double)
+// 79228162514264337593543950335 (Decimal) --> 7.92281625142643E+28 (Double)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs
new file mode 100644
index 00000000000..9b266353dd0
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs
@@ -0,0 +1,65 @@
+module ctou_int16
+
+//
+// Example of the explicit conversions from decimal to short and
+// decimal to ushort.
+let print obj1 obj2 obj3 =
+ printfn $"{obj1, 16}{obj2, 19}{obj3, 19}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Convert the decimal argument; catch exceptions that are thrown.
+let decimalToU_Int16 (argument: decimal) =
+ let int16Value: obj =
+ // Convert the argument to a int16 value.
+ try
+ int16 argument
+ with ex -> getExceptionType ex
+
+ let uint16Value: obj =
+ // Convert the argument to a uint16 value.
+ try
+ uint16 argument
+ with ex -> getExceptionType ex
+
+ print argument int16Value uint16Value
+
+printfn "This example of the explicit conversions from decimal to short\nand decimal to ushort generates the following output. It displays \nseveral converted decimal values.\n"
+print "decimal argument" "short/exception" "ushort/exception"
+print "----------------" "---------------" "----------------"
+
+// Convert decimal values and display the results.
+decimalToU_Int16 123M
+decimalToU_Int16 (new decimal (123000, 0, 0, false, 3uy))
+decimalToU_Int16 123.999M
+decimalToU_Int16 65535.999M
+decimalToU_Int16 65536M
+decimalToU_Int16 32767.999M
+decimalToU_Int16 32768M
+decimalToU_Int16 -0.999M
+decimalToU_Int16 -1M
+decimalToU_Int16 -32768.999M
+decimalToU_Int16 -32769M
+
+
+// This example of the explicit conversions from decimal to short
+// and decimal to ushort generates the following output. It displays
+// several converted decimal values.
+//
+// decimal argument short/exception ushort/exception
+// ---------------- --------------- ----------------
+// 123 123 123
+// 123.000 123 123
+// 123.999 123 123
+// 65535.999 OverflowException 65535
+// 65536 OverflowException OverflowException
+// 32767.999 32767 32767
+// 32768 OverflowException 32768
+// -0.999 0 0
+// -1 -1 OverflowException
+// -32768.999 -32768 OverflowException
+// -32769 OverflowException OverflowException
+//
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs
new file mode 100644
index 00000000000..78cdf0664f3
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs
@@ -0,0 +1,65 @@
+module ctou_int32
+
+//
+// Example of the explicit conversions from decimal to int and
+// decimal to uint.
+let print obj1 obj2 obj3 = printfn $"{obj1,17}{obj2,19}{obj3,19}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Convert the decimal argument; catch exceptions that are thrown.
+let decimalToU_Int32 (argument: decimal) =
+ let int32Value: obj =
+ // Convert the argument to a int32 value.
+ try
+ int32 argument
+ with ex -> getExceptionType ex
+
+ let uint32Value: obj =
+ // Convert the argument to a uint32 value.
+ try
+ uint32 argument
+ with ex -> getExceptionType ex
+
+ print argument int32Value uint32Value
+
+printfn "This example of the explicit conversions from decimal to int\nand decimal to uint generates the following output. It displays\nseveral converted decimal values.\n"
+
+print "decimal argument" "int/exception" "uint/exception"
+print "----------------" "-------------" "--------------"
+
+// Convert decimal values and display the results.
+decimalToU_Int32 123M
+decimalToU_Int32 (new decimal(123000, 0, 0, false, 3uy))
+decimalToU_Int32 123.999M
+decimalToU_Int32 4294967295.999M
+decimalToU_Int32 4294967296M
+decimalToU_Int32 2147483647.999M
+decimalToU_Int32 2147483648M
+decimalToU_Int32 -0.999M
+decimalToU_Int32 -1M
+decimalToU_Int32 -2147483648.999M
+decimalToU_Int32 -2147483649M
+
+
+// This example of the explicit conversions from decimal to int
+// and decimal to uint generates the following output. It displays
+// several converted decimal values.
+//
+// decimal argument int/exception uint/exception
+// ---------------- ------------- --------------
+// 123 123 123
+// 123.000 123 123
+// 123.999 123 123
+// 4294967295.999 OverflowException 4294967295
+// 4294967296 OverflowException OverflowException
+// 2147483647.999 2147483647 2147483647
+// 2147483648 OverflowException 2147483648
+// -0.999 0 0
+// -1 -1 OverflowException
+// -2147483648.999 -2147483648 OverflowException
+// -2147483649 OverflowException OverflowException
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs
new file mode 100644
index 00000000000..914f2cbbc38
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs
@@ -0,0 +1,65 @@
+module ctou_int64
+
+//
+// Example of the explicit conversions from decimal to long and
+// decimal to ulong.
+let print obj1 obj2 obj3 = printfn $"{obj1,25}{obj2,22}{obj3,22}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Convert the decimal argument; catch exceptions that are thrown.
+let decimalToU_Int64 (argument: decimal) =
+ let int32Value: obj =
+ // Convert the argument to a int64 value.
+ try
+ int32 argument
+ with ex -> getExceptionType ex
+
+ let uint32Value: obj =
+ // Convert the argument to a uint64 value.
+ try
+ uint32 argument
+ with ex -> getExceptionType ex
+
+ print argument int32Value uint32Value
+
+printfn "This example of the explicit conversions from decimal to long\nand decimal to ulong generates the following output. It displays\nseveral converted decimal values.\n"
+
+print "decimal argument" "long/exception" "ulong/exception"
+print "----------------" "--------------" "---------------"
+
+// Convert decimal values and display the results.
+decimalToU_Int64 123M
+decimalToU_Int64 (new decimal(123000, 0, 0, false, 3uy))
+decimalToU_Int64 123.999M
+decimalToU_Int64 18446744073709551615.999M
+decimalToU_Int64 18446744073709551616M
+decimalToU_Int64 9223372036854775807.999M
+decimalToU_Int64 9223372036854775808M
+decimalToU_Int64 -0.999M
+decimalToU_Int64 -1M
+decimalToU_Int64 -9223372036854775808.999M
+decimalToU_Int64 -9223372036854775809M
+
+
+// This example of the explicit conversions from decimal to long
+// and decimal to ulong generates the following output. It displays
+// several converted decimal values.
+//
+// decimal argument long/exception ulong/exception
+// ---------------- -------------- ---------------
+// 123 123 123
+// 123.000 123 123
+// 123.999 123 123
+// 18446744073709551615.999 OverflowException 18446744073709551615
+// 18446744073709551616 OverflowException OverflowException
+// 9223372036854775807.999 9223372036854775807 9223372036854775807
+// 9223372036854775808 OverflowException 9223372036854775808
+// -0.999 0 0
+// -1 -1 OverflowException
+// -9223372036854775808.999 -9223372036854775808 OverflowException
+// -9223372036854775809 OverflowException OverflowException
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj
new file mode 100644
index 00000000000..dd67eb6263b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj
@@ -0,0 +1,14 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs
new file mode 100644
index 00000000000..ee9c63e1a72
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs
@@ -0,0 +1,22 @@
+//
+open System
+
+// Divide a series of numbers by 22.1
+let dividend = 1230.0m
+let divisor = 22.1m
+for i = 0 to 10 do
+ printfn $"{dividend:N1} / {divisor:N1} = {Decimal.Divide(dividend + (decimal i) * 0.1m, divisor):N4}"
+
+// The example displays the following output:
+// 1,230.0 / 22.1 = 55.6561
+// 1,230.1 / 22.1 = 55.6606
+// 1,230.2 / 22.1 = 55.6652
+// 1,230.3 / 22.1 = 55.6697
+// 1,230.4 / 22.1 = 55.6742
+// 1,230.5 / 22.1 = 55.6787
+// 1,230.6 / 22.1 = 55.6833
+// 1,230.7 / 22.1 = 55.6878
+// 1,230.8 / 22.1 = 55.6923
+// 1,230.9 / 22.1 = 55.6968
+// 1,231.0 / 22.1 = 55.7014
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj
new file mode 100644
index 00000000000..eed21366d8b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs
new file mode 100644
index 00000000000..61c8a6f580d
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs
@@ -0,0 +1,31 @@
+module Round1
+
+//
+open System
+
+for value in 100m .. 0.1m .. 102m do
+ printfn $"{value} --> {Decimal.Round value}"
+
+// The example displays the following output:
+// 100 --> 100
+// 100.1 --> 100
+// 100.2 --> 100
+// 100.3 --> 100
+// 100.4 --> 100
+// 100.5 --> 100
+// 100.6 --> 101
+// 100.7 --> 101
+// 100.8 --> 101
+// 100.9 --> 101
+// 101.0 --> 101
+// 101.1 --> 101
+// 101.2 --> 101
+// 101.3 --> 101
+// 101.4 --> 101
+// 101.5 --> 102
+// 101.6 --> 102
+// 101.7 --> 102
+// 101.8 --> 102
+// 101.9 --> 102
+// 102.0 --> 102
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs
new file mode 100644
index 00000000000..45c52a3645c
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs
@@ -0,0 +1,38 @@
+module Round12
+
+//
+open System
+
+// Define a set of Decimal values.
+let values =
+ [ 1.45m; 1.55m; 123.456789m; 123.456789m
+ 123.456789m; -123.456m
+ Decimal(1230000000, 0, 0, true, 7uy)
+ Decimal(1230000000, 0, 0, true, 7uy)
+ -9999999999.9999999999m
+ -9999999999.9999999999m ]
+
+// Define a set of integers to for decimals argument.
+let decimals =
+ [ 1; 1; 4; 6; 8; 0; 3; 11; 9; 10 ]
+
+printfn $"""{"Argument",26}{"Digits",8}{"Result",26}"""
+printfn $"""{"--------",26}{"------",8}{"------",26}"""
+
+for i = 0 to values.Length - 1 do
+ printfn $"{values[i],26}{decimals[i],8}{Decimal.Round(values[i], decimals[i]),26}"
+
+// The example displays the following output:
+// Argument Digits Result
+// -------- ------ ------
+// 1.45 1 1.4
+// 1.55 1 1.6
+// 123.456789 4 123.4568
+// 123.456789 6 123.456789
+// 123.456789 8 123.456789
+// -123.456 0 -123
+// -123.0000000 3 -123.000
+// -123.0000000 11 -123.0000000
+// -9999999999.9999999999 9 -10000000000.000000000
+// -9999999999.9999999999 10 -9999999999.9999999999
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj
new file mode 100644
index 00000000000..f8f9ffebeee
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs
new file mode 100644
index 00000000000..6efa166d7ec
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs
@@ -0,0 +1,24 @@
+//
+open System
+
+let values =
+ [ 12.6m; 12.1m; 9.5m; 8.16m; 0.1m; -0.1m; -1.1m; -1.9m; -3.9m ]
+
+printfn "%-8s %10s %10s\n" "Value" "Ceiling" "Floor"
+
+for value in values do
+ printfn $"%-8O{value} %10O{Decimal.Ceiling value} %10O{Decimal.Floor value}"
+
+// The example displays the following output:
+// Value Ceiling Floor
+//
+// 12.6 13 12
+// 12.1 13 12
+// 9.5 10 9
+// 8.16 9 8
+// 0.1 1 0
+// -0.1 0 -1
+// -1.1 -1 -2
+// -1.9 -1 -2
+// -3.9 -3 -4
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj
new file mode 100644
index 00000000000..e410d2fc902
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs
new file mode 100644
index 00000000000..e14bf2589c2
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs
@@ -0,0 +1,20 @@
+open System
+
+let divideWithoutRounding () =
+ //
+ let dividend = Decimal.One
+ let divisor = 3m
+ // The following displays 0.9999999999999999999999999999 to the console
+ printfn $"{dividend/divisor * divisor}"
+ //
+
+let divideWithRounding () =
+ //
+ let dividend = Decimal.One
+ let divisor = 3m
+ // The following displays 1.00 to the console
+ printfn $"{Math.Round(dividend/divisor * divisor, 2)}"
+ //
+
+divideWithoutRounding ()
+divideWithRounding ()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj
new file mode 100644
index 00000000000..f3bb7fa3822
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs
new file mode 100644
index 00000000000..9be4ebdc39a
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs
@@ -0,0 +1,62 @@
+module comp_equal
+
+//
+// Example of the decimal.Compare and static decimal.Equals methods.
+open System
+
+let print message obj = printfn $"%-45s{message}{obj}"
+
+// Compare decimal parameters, and display them with the results.
+let compareDecimals (left: decimal) (right: decimal) (rightText: string) =
+ printfn ""
+ print $"right: {rightText}" right
+ print "decimal.Equals(left, right) " (Decimal.Equals(left, right))
+ print "decimal.Compare(left, right) " (Decimal.Compare(left, right))
+
+Console.WriteLine( "This example of the " +
+ "decimal.Equals(decimal, decimal) and \n" +
+ "decimal.Compare(decimal, decimal) methods " +
+ "generates the \nfollowing output. It creates several " +
+ "different decimal \nvalues and compares them with " +
+ "the following reference value.\n" )
+
+// Create a reference decimal value.
+let left = decimal 123.456
+
+print "left: decimal( 123.456 )" left
+
+// Create decimal values to compare with the reference.
+compareDecimals left (decimal 1.2345600E+2 ) "decimal(1.2345600E+2)"
+compareDecimals left 123.4561M "123.4561M"
+compareDecimals left 123.4559M "123.4559M"
+compareDecimals left 123.456000M "123.456000M"
+compareDecimals left (Decimal(123456000, 0, 0, false, 6uy)) "Decimal(123456000, 0, 0, false, 6)"
+
+
+// This example of the decimal.Equals(decimal, decimal) and
+// decimal.Compare(decimal, decimal) methods generates the
+// following output. It creates several different decimal
+// values and compares them with the following reference value.
+
+// left: decimal(123.456) 123.456
+
+// right: decimal(1.2345600E+2) 123.456
+// decimal.Equals(left, right) True
+// decimal.Compare(left, right) 0
+
+// right: 123.4561M 123.4561
+// decimal.Equals(left, right) False
+// decimal.Compare(left, right) -1
+
+// right: 123.4559M 123.4559
+// decimal.Equals(left, right) False
+// decimal.Compare(left, right) 1
+
+// right: 123.456000M 123.456000
+// decimal.Equals(left, right) True
+// decimal.Compare(left, right) 0
+
+// right: decimal(123456000, 0, 0, false, 6) 123.456000
+// decimal.Equals(left, right) True
+// decimal.Compare(left, right) 0
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs
new file mode 100644
index 00000000000..96f76da833e
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs
@@ -0,0 +1,76 @@
+module cto_eq_obj
+
+//
+// Example of the decimal.CompareTo and decimal.Equals instance
+// methods.
+open System
+
+// Get the exception type name remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Compare the decimal to the object parameters,
+// and display the object parameters with the results.
+let compDecimalToObject (left: decimal) (right: obj) (rightText: string) =
+ printfn $"object: %-38s{rightText}{right}"
+ printfn $"""%-46s{"left.Equals(object)"}{left.Equals right}"""
+ printf $"""%-46s{"left.CompareTo(object)"}"""
+
+ try
+ // Catch the exception if CompareTo( ) throws one.
+ printfn $"{left.CompareTo right}\n"
+ with ex ->
+ printfn $"{getExceptionType ex}\n"
+
+Console.WriteLine(
+ "This example of the decimal.Equals( object ) and \n" +
+ "decimal.CompareTo( object ) methods generates the \n" +
+ "following output. It creates several different " +
+ "decimal \nvalues and compares them with the following " +
+ "reference value.\n" )
+
+// Create a reference decimal value.
+let left = decimal 987.654
+
+printfn $"""{"Left: decimal(987.654)",-46}{left}\n"""
+
+// Create objects to compare with the reference.
+compDecimalToObject left (decimal 9.8765400E+2 ) "decimal(9.8765400E+2)"
+compDecimalToObject left 987.6541M "987.6541D"
+compDecimalToObject left 987.6539M "987.6539D"
+compDecimalToObject left (Decimal(987654000, 0, 0, false, 6uy)) "Decimal(987654000, 0, 0, false, 6)"
+compDecimalToObject left 9.8765400E+2 "Double 9.8765400E+2"
+compDecimalToObject left "987.654" "String \"987.654\""
+
+
+// This example of the Decimal.Equals(object) and
+// Decimal.CompareTo(object) methods generates the
+// following output. It creates several different decimal
+// values and compares them with the following reference value.
+// Left: decimal(987.654) 987.654
+//
+// object: decimal(9.8765400E+2) 987.654
+// left.Equals(object) True
+// left.CompareTo(object) 0
+//
+// object: 987.6541D 987.6541
+// left.Equals(object) False
+// left.CompareTo(object) -1
+//
+// object: 987.6539D 987.6539
+// left.Equals(object) False
+// left.CompareTo(object) 1
+//
+// object: Decimal(987654000, 0, 0, false, 6) 987.654000
+// left.Equals(object) True
+// left.CompareTo(object) 0
+//
+// object: Double 9.8765400E+2 987.654
+// left.Equals(object) False
+// left.CompareTo(object) ArgumentException
+//
+// object: String "987.654" 987.654
+// left.Equals(object) False
+// left.CompareTo(object) ArgumentException
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj
new file mode 100644
index 00000000000..c301fdd8f8b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs
new file mode 100644
index 00000000000..20a0bf0ea09
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs
@@ -0,0 +1,90 @@
+module ctoriarr
+
+//
+// Example of the decimal(int[]) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal (bits: int[]) =
+ // Format the constructor for display.
+ let mutable ctor = String.Format("decimal( {{ 0x{0:X}", bits[0])
+
+ for i = 1 to bits.Length - 1 do
+ ctor <- $"{ctor}, 0x{bits[i]:X}"
+ ctor <- ctor + " } )"
+
+ let valOrExc =
+ try
+ // Construct the decimal value.
+ let decimalNum = new decimal(bits)
+
+ // Format the decimal value for display.
+ string decimalNum
+ with ex ->
+ // Save the exception type if an exception was thrown.
+ getExceptionType ex
+
+ // Display the constructor and decimal value or exception.
+ let ctorLen = 76 - valOrExc.Length;
+
+ // Display the data on one line if it will fit.
+ if ctorLen > ctor.Length then
+ printfn $"{ctor.PadRight ctorLen}{valOrExc}"
+
+ // Otherwise, display the data on two lines.
+ else
+ printfn $"{ctor}"
+ printfn $"{valOrExc,76}"
+
+printfn
+ """This example of the decimal(int[]) constructor
+generates the following output.
+"""
+printfn "%-38s%38s" "Constructor" "Value or Exception"
+printfn "%-38s%38s" "-----------" "------------------"
+
+// Construct decimal objects from integer arrays.
+createDecimal [| 0; 0; 0; 0 |]
+createDecimal [| 0; 0; 0 |]
+createDecimal [| 0; 0; 0; 0; 0 |]
+createDecimal [| 1000000000; 0; 0; 0 |]
+createDecimal [| 0; 1000000000; 0; 0 |]
+createDecimal [| 0; 0; 1000000000; 0 |]
+createDecimal [| 0; 0; 0; 1000000000 |]
+createDecimal [| -1; -1; -1; 0 |]
+createDecimal [| -1; -1; -1; 0x80000000 |]
+createDecimal [| -1; 0; 0; 0x100000 |]
+createDecimal [| -1; 0; 0; 0x1C0000 |]
+createDecimal [| -1; 0; 0; 0x1D0000 |]
+createDecimal [| -1; 0; 0; 0x1C0001 |]
+createDecimal [| 0xF0000; 0xF0000; 0xF0000; 0xF0000 |]
+
+
+// This example of the decimal(int[]) constructor
+// generates the following output.
+//
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( { 0x0, 0x0, 0x0, 0x0 } ) 0
+// decimal( { 0x0, 0x0, 0x0 } ) ArgumentException
+// decimal( { 0x0, 0x0, 0x0, 0x0, 0x0 } ) ArgumentException
+// decimal( { 0x3B9ACA00, 0x0, 0x0, 0x0 } ) 1000000000
+// decimal( { 0x0, 0x3B9ACA00, 0x0, 0x0 } ) 4294967296000000000
+// decimal( { 0x0, 0x0, 0x3B9ACA00, 0x0 } ) 18446744073709551616000000000
+// decimal( { 0x0, 0x0, 0x0, 0x3B9ACA00 } ) ArgumentException
+// decimal( { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0 } )
+// 79228162514264337593543950335
+// decimal( { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x80000000 } )
+// -79228162514264337593543950335
+// decimal( { 0xFFFFFFFF, 0x0, 0x0, 0x100000 } ) 0.0000004294967295
+// decimal( { 0xFFFFFFFF, 0x0, 0x0, 0x1C0000 } ) 0.0000000000000000004294967295
+// decimal( { 0xFFFFFFFF, 0x0, 0x0, 0x1D0000 } ) ArgumentException
+// decimal( { 0xFFFFFFFF, 0x0, 0x0, 0x1C0001 } ) ArgumentException
+// decimal( { 0xF0000, 0xF0000, 0xF0000, 0xF0000 } )
+// 18133887298.441562272235520
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs
new file mode 100644
index 00000000000..7d8fa8f92ea
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs
@@ -0,0 +1,87 @@
+module ctoriiibby
+
+//
+// Example of the decimal( int, int, int, bool, byte ) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal low mid high (isNeg: bool) (scale: byte) =
+ // Format the constructor for display.
+ let ctor =
+ $"decimal( %i{low}, %i{mid}, %i{high}, {isNeg}, {scale} )"
+
+ let valOrExc =
+ try
+ // Construct the decimal value.
+ let decimalNum = new decimal(low, mid, high, isNeg, scale)
+
+ // Format and save the decimal value.
+ decimalNum |> string
+ with ex ->
+ // Save the exception type if an exception was thrown.
+ getExceptionType ex
+
+ // Display the constructor and decimal value or exception.
+ let ctorLen = 76 - valOrExc.Length
+
+ // Display the data on one line if it will fit.
+ if ctorLen > ctor.Length then
+ printfn $"{ctor.PadRight ctorLen}{valOrExc}"
+
+ // Otherwise, display the data on two lines.
+ else
+ printfn $"{ctor}"
+ printfn $"{valOrExc,76}"
+
+printfn
+ """This example of the decimal(int, int, int, bool, byte)
+constructor generates the following output.
+"""
+printfn "%-38s%38s" "Constructor" "Value or Exception"
+printfn "%-38s%38s" "-----------" "------------------"
+
+// Construct decimal objects from the component fields.
+createDecimal 0 0 0 false 0uy
+createDecimal 0 0 0 false 27uy
+createDecimal 0 0 0 true 0uy
+createDecimal 1000000000 0 0 false 0uy
+createDecimal 0 1000000000 0 false 0uy
+createDecimal 0 0 1000000000 false 0uy
+createDecimal 1000000000 1000000000 1000000000 false 0uy
+createDecimal -1 -1 -1 false 0uy
+createDecimal -1 -1 -1 true 0uy
+createDecimal -1 -1 -1 false 15uy
+createDecimal -1 -1 -1 false 28uy
+createDecimal -1 -1 -1 false 29uy
+createDecimal Int32.MaxValue 0 0 false 18uy
+createDecimal Int32.MaxValue 0 0 false 28uy
+createDecimal Int32.MaxValue 0 0 true 28uy
+
+
+// This example of the decimal(int, int, int, bool, byte)
+// constructor generates the following output.
+//
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( 0, 0, 0, False, 0 ) 0
+// decimal( 0, 0, 0, False, 27 ) 0
+// decimal( 0, 0, 0, True, 0 ) 0
+// decimal( 1000000000, 0, 0, False, 0 ) 1000000000
+// decimal( 0, 1000000000, 0, False, 0 ) 4294967296000000000
+// decimal( 0, 0, 1000000000, False, 0 ) 18446744073709551616000000000
+// decimal( 1000000000, 1000000000, 1000000000, False, 0 )
+// 18446744078004518913000000000
+// decimal( -1, -1, -1, False, 0 ) 79228162514264337593543950335
+// decimal( -1, -1, -1, True, 0 ) -79228162514264337593543950335
+// decimal( -1, -1, -1, False, 15 ) 79228162514264.337593543950335
+// decimal( -1, -1, -1, False, 28 ) 7.9228162514264337593543950335
+// decimal( -1, -1, -1, False, 29 ) ArgumentOutOfRangeException
+// decimal( 2147483647, 0, 0, False, 18 ) 0.000000002147483647
+// decimal( 2147483647, 0, 0, False, 28 ) 0.0000000000000000002147483647
+// decimal( 2147483647, 0, 0, True, 28 ) -0.0000000000000000002147483647
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
new file mode 100644
index 00000000000..b53d977164f
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs
new file mode 100644
index 00000000000..a461cbb8fd0
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs
@@ -0,0 +1,41 @@
+module ctori
+
+//
+// Example of the decimal(int) constructor.
+open System
+
+// Create a decimal object and display its value.
+let createDecimal (value: int) valToStr =
+ let decimalNum = new decimal(value)
+
+ // Format the constructor for display.
+ let ctor = $"decimal( {valToStr} )"
+
+ // Display the constructor and its value.
+ printfn $"{ctor,-30}{decimalNum,16}"
+
+printfn "This example of the decimal(int) constructor\ngenerates the following output.\n"
+printfn "%-30s%16s" "Constructor" "Value"
+printfn "%-30s%16s" "-----------" "-----"
+
+// Construct decimal objects from int values.
+createDecimal Int32.MinValue "Int32.MinValue"
+createDecimal Int32.MaxValue "int.MaxValue"
+createDecimal 0 "0"
+createDecimal 999999999 "999999999"
+createDecimal 0x40000000 "0x40000000"
+createDecimal (int 0xC0000000) "int 0xC0000000"
+
+
+// This example of the decimal(int) constructor
+// generates the following output.
+
+// Constructor Value
+// ----------- -----
+// decimal( Int32.MinValue ) -2147483648
+// decimal( Int32.MaxValue ) 2147483647
+// decimal( 0 ) 0
+// decimal( 999999999 ) 999999999
+// decimal( 0x40000000 ) 1073741824
+// decimal( int 0xC0000000 ) -1073741824
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs
new file mode 100644
index 00000000000..e27c5b22a66
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs
@@ -0,0 +1,40 @@
+module ctorl
+
+//
+// Example of the decimal( int64 ) constructor.
+open System
+
+// Create a decimal object and display its value.
+let createDecimal (value: int64) valToStr =
+ let decimalNum = Decimal value
+
+ // Format the constructor for display.
+ let ctor = $"decimal( {valToStr} )"
+
+ // Display the constructor and its value.
+ printfn $"{ctor,-35}{decimalNum,22}"
+
+printfn "This example of the decimal( int64 ) constructor\ngenerates the following output.\n"
+printfn "%-35s%22s" "Constructor" "Value"
+printfn "%-35s%22s" "-----------" "-----"
+
+// Construct decimal objects from long values.
+createDecimal Int64.MinValue "Int64.MinValue"
+createDecimal Int64.MaxValue "Int64.MaxValue"
+createDecimal 0L "0L"
+createDecimal 999999999999999999L "999999999999999999L"
+createDecimal 0x2000000000000000L "0x2000000000000000L"
+createDecimal (int64 0xE000000000000000L) "int64 0xE000000000000000L"
+
+// This example of the decimal( int64 ) constructor
+// generates the following output.
+//
+// Constructor Value
+// ----------- -----
+// decimal( Int64.MinValue ) -9223372036854775808
+// decimal( Int64.MaxValue ) 9223372036854775807
+// decimal( 0L ) 0
+// decimal( 999999999999999999L ) 999999999999999999
+// decimal( 0x2000000000000000L ) 2305843009213693952
+// decimal( int64 0xE000000000000000L ) -2305843009213693952
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs
new file mode 100644
index 00000000000..a9704b91cf9
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs
@@ -0,0 +1,41 @@
+module ctorui
+
+//
+// Example of the decimal( uint ) constructor.
+open System
+
+// Create a decimal object and display its value.
+let createDecimal (value: uint) valToStr =
+ let decimalNum = Decimal value
+
+ // Format the constructor for display.
+ let ctor = $"decimal( {valToStr} )"
+
+ // Display the constructor and its value.
+ printfn $"{ctor,-33}{decimalNum,16}"
+
+printfn "This example of the decimal( uint ) constructor \ngenerates the following output.\n"
+printfn "%-33s%16s" "Constructor" "Value"
+printfn "%-33s%16s" "-----------" "-----"
+
+// Construct decimal objects from uint values.
+createDecimal UInt32.MinValue "UInt32.MinValue"
+createDecimal UInt32.MaxValue "UInt32.MaxValue"
+createDecimal (uint Int32.MaxValue) "uint Int32.MaxValue"
+createDecimal 999999999u "999999999u"
+createDecimal 0x40000000u "0x40000000u"
+createDecimal 0xC0000000u "0xC0000000u"
+
+
+// This example of the decimal( uint ) constructor
+// generates the following output.
+//
+// Constructor Value
+// ----------- -----
+// decimal( UInt32.MinValue ) 0
+// decimal( UInt32.MaxValue ) 4294967295
+// decimal( uint Int32.MaxValue ) 2147483647
+// decimal( 999999999u ) 999999999
+// decimal( 0x40000000u ) 1073741824
+// decimal( 0xC0000000u ) 3221225472
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs
new file mode 100644
index 00000000000..faa0a09ef1c
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs
@@ -0,0 +1,41 @@
+module ctorul
+
+//
+// Example of the decimal( uint64 ) constructor.
+open System
+
+// Create a decimal object and display its value.
+let createDecimal (value: uint64) valToStr =
+ let decimalNum = Decimal value
+
+ // Format the constructor for display.
+ let ctor = $"decimal( {valToStr} )"
+
+ // Display the constructor and its value.
+ printfn $"{ctor,-35}{decimalNum,22}"
+
+printfn "This example of the decimal( uint64 ) constructor \ngenerates the following output.\n"
+printfn "%-35s%22s" "Constructor" "Value"
+printfn "%-35s%22s" "-----------" "-----"
+
+// Construct decimal objects from ulong values.
+createDecimal UInt64.MinValue "UInt64.MinValue"
+createDecimal UInt64.MaxValue "UInt64.MaxValue"
+createDecimal (uint64 Int64.MaxValue) "int64 Int64.MaxValue"
+createDecimal 999999999999999999uL "999999999999999999uL"
+createDecimal 0x2000000000000000uL "0x2000000000000000uL"
+createDecimal 0xE000000000000000uL "0xE000000000000000uL"
+
+
+// This example of the decimal( uint64 ) constructor
+// generates the following output.
+//
+// Constructor Value
+// ----------- -----
+// decimal( UInt64.MinValue ) 0
+// decimal( UInt64.MaxValue ) 18446744073709551615
+// decimal( int64 Int64.MaxValue ) 9223372036854775807
+// decimal( 999999999999999999uL ) 999999999999999999
+// decimal( 0x2000000000000000uL ) 2305843009213693952
+// decimal( 0xE000000000000000uL ) 16140901064495857664
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj
new file mode 100644
index 00000000000..b3fdced9981
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj
@@ -0,0 +1,12 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
new file mode 100644
index 00000000000..5a3f4f5534d
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
@@ -0,0 +1,54 @@
+//
+// Example of the decimal( double ) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal (value: double) valToStr =
+ // Format and display the constructor.
+ printf "%-34s" $"decimal( {valToStr} )"
+
+ try
+ // Construct the decimal value.
+ let decimalNum = Decimal value
+
+ // Display the value if it was created successfully.
+ printfn $"{decimalNum,31}"
+ with ex ->
+ // Display the exception type if an exception was thrown.
+ printfn $"{getExceptionType ex,31}"
+
+printfn $"This example of the decimal( double ) constructor \ngenerates the following output.\n"
+printfn "%-34s%31s" "Constructor" "Value or Exception"
+printfn "%-34s%31s" "-----------" "------------------"
+
+// Construct decimal objects from double values.
+createDecimal 1.23456789E+5 "1.23456789E+5"
+createDecimal 1.234567890123E+15 "1.234567890123E+15"
+createDecimal 1.2345678901234567E+25 "1.2345678901234567E+25"
+createDecimal 1.2345678901234567E+35 "1.2345678901234567E+35"
+createDecimal 1.23456789E-5 "1.23456789E-5"
+createDecimal 1.234567890123E-15 "1.234567890123E-15"
+createDecimal 1.2345678901234567E-25 "1.2345678901234567E-25"
+createDecimal 1.2345678901234567E-35 "1.2345678901234567E-35"
+createDecimal (1. / 7.) "1. / 7."
+
+
+// This example of the decimal( double ) constructor
+// generates the following output.
+//
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( 1.23456789E+5 ) 123456.789
+// decimal( 1.234567890123E+15 ) 1234567890123000
+// decimal( 1.2345678901234567E+25 ) 12345678901234600000000000
+// decimal( 1.2345678901234567E+35 ) OverflowException
+// decimal( 1.23456789E-5 ) 0.0000123456789
+// decimal( 1.234567890123E-15 ) 0.000000000000001234567890123
+// decimal( 1.2345678901234567E-25 ) 0.0000000000000000000000001235
+// decimal( 1.2345678901234567E-35 ) 0
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
new file mode 100644
index 00000000000..b4a212a5b6a
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
@@ -0,0 +1,67 @@
+module ctors
+
+//
+// Example of the decimal( float ) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal (value: float32) valToStr =
+ // Format and display the constructor.
+ printf "%-27s" $"decimal( {valToStr} )"
+
+ try
+ // Construct the decimal value.
+ let decimalNum = Decimal value
+
+ // Display the value if it was created successfully.
+ printfn $"{decimalNum,31}"
+ with ex ->
+ // Display the exception type if an exception was thrown.
+ printfn $"{getExceptionType ex,31}"
+
+ public static void Main( )
+ {
+
+ Console.WriteLine( "This example of the decimal( float ) " +
+ "constructor \ngenerates the following output.\n" );
+ Console.WriteLine( "{0,-27}{1,31}", "Constructor",
+ "Value or Exception" );
+ Console.WriteLine( "{0,-27}{1,31}", "-----------",
+ "------------------" );
+
+ // Construct decimal objects from float values.
+ CreateDecimal( 1.2345E+5F, "1.2345E+5F" );
+ CreateDecimal( 1.234567E+15F, "1.234567E+15F" );
+ CreateDecimal( 1.23456789E+25F, "1.23456789E+25F" );
+ CreateDecimal( 1.23456789E+35F, "1.23456789E+35F" );
+ CreateDecimal( 1.2345E-5F, "1.2345E-5F" );
+ CreateDecimal( 1.234567E-15F, "1.234567E-15F" );
+ CreateDecimal( 1.23456789E-25F, "1.23456789E-25F" );
+ CreateDecimal( 1.23456789E-35F, "1.23456789E-35F" );
+ CreateDecimal( 1.0F / 7.0F, "1.0F / 7.0F" );
+ }
+}
+
+/*
+This example of the decimal( float ) constructor
+generates the following output.
+
+Constructor Value or Exception
+----------- ------------------
+decimal( 1.2345E+5F ) 123450
+decimal( 1.234567E+15F ) 1234567000000000
+decimal( 1.23456789E+25F ) 12345680000000000000000000
+decimal( 1.23456789E+35F ) OverflowException
+decimal( 1.2345E-5F ) 0.000012345
+decimal( 1.234567E-15F ) 0.000000000000001234567
+decimal( 1.23456789E-25F ) 0.0000000000000000000000001235
+decimal( 1.23456789E-35F ) 0
+decimal( 1.0F / 7.0F ) 0.1428571
+*/
+//
+// Copied from /samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctors.cs
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
new file mode 100644
index 00000000000..44cc7ad9274
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs
new file mode 100644
index 00000000000..b69d3ba8de9
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs
@@ -0,0 +1,42 @@
+//
+// Example of the Decimal fields.
+open System
+
+let numberFmt obj1 obj2 = printfn $"{obj1,-25}{obj2,45:N0}"
+let exprFmt obj1 obj2 = printfn $"{obj1,-55}{obj2,15}"
+
+printfn "This example of the fields of the Decimal structure \ngenerates the following output.\n"
+numberFmt "Field or Expression" "Value"
+numberFmt "-------------------" "-----"
+
+// Display the values of the Decimal fields.
+numberFmt "Decimal.MaxValue" Decimal.MaxValue
+numberFmt "Decimal.MinValue" Decimal.MinValue
+numberFmt "Decimal.MinusOne" Decimal.MinusOne
+numberFmt "Decimal.One" Decimal.One
+numberFmt "Decimal.Zero" Decimal.Zero
+printfn ""
+
+// Display the values of expressions of the Decimal fields.
+exprFmt "( Decimal.MinusOne + Decimal.One ) == Decimal.Zero" (Decimal.MinusOne + Decimal.One = Decimal.Zero)
+exprFmt "Decimal.MaxValue + Decimal.MinValue" (Decimal.MaxValue + Decimal.MinValue)
+exprFmt "Decimal.MinValue / Decimal.MaxValue" (Decimal.MinValue / Decimal.MaxValue)
+printfn "%-40s%30O" "100000000000000M / Decimal.MaxValue" (100000000000000M / Decimal.MaxValue)
+
+
+// This example of the fields of the Decimal structure
+// generates the following output.
+//
+// Field or Expression Value
+// ------------------- -----
+// Decimal.MaxValue 79,228,162,514,264,337,593,543,950,335
+// Decimal.MinValue -79,228,162,514,264,337,593,543,950,335
+// Decimal.MinusOne -1
+// Decimal.One 1
+// Decimal.Zero 0
+//
+// ( Decimal.MinusOne + Decimal.One ) == Decimal.Zero True
+// Decimal.MaxValue + Decimal.MinValue 0
+// Decimal.MinValue / Decimal.MaxValue -1
+// 100000000000000M / Decimal.MaxValue 0.0000000000000012621774483536
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj
new file mode 100644
index 00000000000..6b29410faca
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs
new file mode 100644
index 00000000000..c8ba5029dbd
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs
@@ -0,0 +1,61 @@
+//
+// Example of the decimal.Negate, decimal.Floor, and decimal.Truncate
+// methods.
+open System
+
+let dataFmt obj1 obj2 = printfn $"{obj1,-30}{obj2,26}"
+
+// Display decimal parameters and the method results.
+let showDecimalFloorNegTrunc (argument: decimal) =
+ printfn ""
+ dataFmt "decimal argument" argument
+ dataFmt "Decimal.Negate( argument )" (Decimal.Negate argument)
+ dataFmt "decimal.Floor( argument )" (Decimal.Floor argument)
+ dataFmt "decimal.Truncate( argument )" (Decimal.Truncate argument)
+
+printfn
+ """This example of the
+ decimal.Negate( decimal ),
+ decimal.Floor( decimal ), and
+ decimal.Truncate( decimal )
+methods generates the following output."""
+
+// Create pairs of decimal objects.
+showDecimalFloorNegTrunc 0M
+showDecimalFloorNegTrunc 123.456M
+showDecimalFloorNegTrunc -123.456M
+showDecimalFloorNegTrunc (Decimal(1230000000, 0, 0, true, 7uy))
+showDecimalFloorNegTrunc -9999999999.9999999999M
+
+
+// This example of the
+// decimal.Negate( decimal ),
+// decimal.Floor( decimal ), and
+// decimal.Truncate( decimal )
+// methods generates the following output.
+//
+// decimal argument 0
+// Decimal.Negate( argument ) 0
+// decimal.Floor( argument ) 0
+// decimal.Truncate( argument ) 0
+//
+// decimal argument 123.456
+// Decimal.Negate( argument ) -123.456
+// decimal.Floor( argument ) 123
+// decimal.Truncate( argument ) 123
+//
+// decimal argument -123.456
+// Decimal.Negate( argument ) 123.456
+// decimal.Floor( argument ) -124
+// decimal.Truncate( argument ) -123
+//
+// decimal argument -123.0000000
+// Decimal.Negate( argument ) 123.0000000
+// decimal.Floor( argument ) -123
+// decimal.Truncate( argument ) -123
+//
+// decimal argument -9999999999.9999999999
+// Decimal.Negate( argument ) 9999999999.9999999999
+// decimal.Floor( argument ) -10000000000
+// decimal.Truncate( argument ) -9999999999
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj
new file mode 100644
index 00000000000..8ceb919174a
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj
new file mode 100644
index 00000000000..48ab7b2078a
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs
new file mode 100644
index 00000000000..6f12b2da1d3
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs
@@ -0,0 +1,41 @@
+module getbits
+
+//
+open System
+
+// Define an list of Decimal values.
+let values =
+ [ 1M; 100000000000000M; 10000000000000000000000000000M
+ 100000000000000.00000000000000M; 1.0000000000000000000000000000M
+ 123456789M; 0.123456789M; 0.000000000123456789M
+ 0.000000000000000000123456789M; 4294967295M
+ 18446744073709551615M; Decimal.MaxValue
+ Decimal.MinValue; -7.9228162514264337593543950335M ]
+
+printfn $"""{"Argument",31} {"Bits[3]",10:X8}{"Bits[2]",10:X8}{"Bits[1]",10:X8}{"Bits[0]",10:X8}"""
+printfn $"""{"--------",31} {"-------",10:X8}{"-------",10:X8}{"-------",10:X8}{"-------",10:X8}"""
+
+// Iterate each element and display its binary representation
+for value in values do
+ let bits = Decimal.GetBits value
+ printfn $"{value,31} {bits[3],10:X8}{bits[2],10:X8}{bits[1],10:X8}{bits[0],10:X8}"
+
+
+// The example displays the following output:
+// Argument Bits[3] Bits[2] Bits[1] Bits[0]
+// -------- ------- ------- ------- -------
+// 1 00000000 00000000 00000000 00000001
+// 100000000000000 00000000 00000000 00005AF3 107A4000
+// 10000000000000000000000000000 00000000 204FCE5E 3E250261 10000000
+// 100000000000000.00000000000000 000E0000 204FCE5E 3E250261 10000000
+// 1.0000000000000000000000000000 001C0000 204FCE5E 3E250261 10000000
+// 123456789 00000000 00000000 00000000 075BCD15
+// 0.123456789 00090000 00000000 00000000 075BCD15
+// 0.000000000123456789 00120000 00000000 00000000 075BCD15
+// 0.000000000000000000123456789 001B0000 00000000 00000000 075BCD15
+// 4294967295 00000000 00000000 00000000 FFFFFFFF
+// 18446744073709551615 00000000 00000000 FFFFFFFF FFFFFFFF
+// 79228162514264337593543950335 00000000 FFFFFFFF FFFFFFFF FFFFFFFF
+// -79228162514264337593543950335 80000000 FFFFFFFF FFFFFFFF FFFFFFFF
+// -7.9228162514264337593543950335 801C0000 FFFFFFFF FFFFFFFF FFFFFFFF
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs
new file mode 100644
index 00000000000..f64a5b374e7
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs
@@ -0,0 +1,22 @@
+module gettypecode
+
+//
+// Example of the Decimal.GetTypeCode method.
+open System
+
+printfn $"This example of the decimal.GetTypeCode() \nmethod generates the following output.\n"
+
+// Create a decimal object and get its type code.
+let aDecimal = Decimal 1.0
+let typCode = aDecimal.GetTypeCode()
+
+printfn $"Type Code: \"{typCode}\""
+printfn $"Numeric value: {int typCode}"
+
+
+// This example of the decimal.GetTypeCode()
+// method generates the following output.
+//
+// Type Code: "Decimal"
+// Numeric value: 15
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj
new file mode 100644
index 00000000000..ebba121bb00
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs
new file mode 100644
index 00000000000..e9beff72368
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs
@@ -0,0 +1,71 @@
+//
+// Example of the Decimal.Multiply, Decimal.Divide, and
+// Decimal.Remainder methods.
+open System
+
+let dataFmt obj1 obj2 = printfn $"{obj1,-35}{obj2,31}"
+
+// Display decimal parameters and their product, quotient, and remainder.
+let showDecimalProQuoRem left right =
+ printfn ""
+ dataFmt "decimal left" left
+ dataFmt "decimal right" right
+ dataFmt "Decimal.Multiply( left, right )" (Decimal.Multiply(left, right))
+ dataFmt "Decimal.Divide( left, right )" (Decimal.Divide(left, right))
+ dataFmt "Decimal.Remainder( left, right )" (Decimal.Remainder(left, right))
+
+printfn
+ """This example of the
+ Decimal.Multiply( decimal, decimal ),
+ Decimal.Divide( decimal, decimal ), and
+ Decimal.Remainder( decimal, decimal )
+methods generates the following output. It displays
+the product, \nquotient, and remainder of several
+pairs of decimal objects."""
+
+// Create pairs of decimal objects.
+showDecimalProQuoRem 1000M 7M
+showDecimalProQuoRem -1000M 7M
+showDecimalProQuoRem (Decimal(1230000000, 0, 0, false, 7uy)) 0.0012300M
+showDecimalProQuoRem 12345678900000000M 0.0000000012345678M
+showDecimalProQuoRem 123456789.0123456789M 123456789.1123456789M
+
+
+// This example of the
+// Decimal.Multiply( decimal, decimal ),
+// Decimal.Divide( decimal, decimal ), and
+// Decimal.Remainder( decimal, decimal )
+// methods generates the following output. It displays
+// the product, \nquotient, and remainder of several
+// pairs of decimal objects.
+//
+// decimal left 1000
+// decimal right 7
+// Decimal.Multiply( left, right ) 7000
+// Decimal.Divide( left, right ) 142.85714285714285714285714286
+// Decimal.Remainder( left, right ) 6
+//
+// decimal left -1000
+// decimal right 7
+// Decimal.Multiply( left, right ) -7000
+// Decimal.Divide( left, right ) -142.85714285714285714285714286
+// Decimal.Remainder( left, right ) -6
+//
+// decimal left 123.0000000
+// decimal right 0.0012300
+// Decimal.Multiply( left, right ) 0.15129000000000
+// Decimal.Divide( left, right ) 100000
+// Decimal.Remainder( left, right ) 0.0000000
+//
+// decimal left 12345678900000000
+// decimal right 0.0000000012345678
+// Decimal.Multiply( left, right ) 15241577.6390794200000000
+// Decimal.Divide( left, right ) 10000000729000059778004901.796
+// Decimal.Remainder( left, right ) 0.0000000009832122
+//
+// decimal left 123456789.0123456789
+// decimal right 123456789.1123456789
+// Decimal.Multiply( left, right ) 15241578765584515.651425087878
+// Decimal.Divide( left, right ) 0.9999999991899999933660999449
+// Decimal.Remainder( left, right ) 123456789.0123456789
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs
new file mode 100644
index 00000000000..a66cf1abd71
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs
@@ -0,0 +1,56 @@
+module fromoacurrency
+
+//
+// Example of the Decimal.FromOACurrency method.
+open System
+
+let dataFmt obj1 obj2 = printfn $"{obj1,21}{obj2,25}"
+
+// Display the Decimal.FromOACurrency parameter and decimal result.
+let showDecimalFromOACurrency argument =
+ let decCurrency = Decimal.FromOACurrency argument
+
+ dataFmt argument decCurrency
+
+printfn
+ """This example of the Decimal.FromOACurrency() method generates
+the following output. It displays the OLE Automation Currency
+value as a long and the result as a decimal.
+"""
+dataFmt "OA Currency" "Decimal Value"
+dataFmt "-----------" "-------------"
+
+// Convert OLE Automation Currency values to decimal objects.
+showDecimalFromOACurrency 0L
+showDecimalFromOACurrency 1L
+showDecimalFromOACurrency 100000L
+showDecimalFromOACurrency 100000000000L
+showDecimalFromOACurrency 1000000000000000000L
+showDecimalFromOACurrency 1000000000000000001L
+showDecimalFromOACurrency Int64.MaxValue
+showDecimalFromOACurrency Int64.MinValue
+showDecimalFromOACurrency 123456789L
+showDecimalFromOACurrency 1234567890000L
+showDecimalFromOACurrency 1234567890987654321L
+showDecimalFromOACurrency 4294967295L
+
+
+// This example of the Decimal.FromOACurrency() method generates
+// the following output. It displays the OLE Automation Currency
+// value as a long and the result as a decimal.
+
+// OA Currency Decimal Value
+// ----------- -------------
+// 0 0
+// 1 0.0001
+// 100000 10
+// 100000000000 10000000
+// 1000000000000000000 100000000000000
+// 1000000000000000001 100000000000000.0001
+// 9223372036854775807 922337203685477.5807
+// -9223372036854775808 -922337203685477.5808
+// 123456789 12345.6789
+// 1234567890000 123456789
+// 1234567890987654321 123456789098765.4321
+// 4294967295 429496.7295
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj
new file mode 100644
index 00000000000..c556a0ae0f1
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs
new file mode 100644
index 00000000000..df2ac3d02ac
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs
@@ -0,0 +1,69 @@
+module tooacurrency
+
+//
+// Example of the Decimal.ToOACurrency method.
+open System
+
+let dataFmt obj1 obj2 = printfn $"{obj1,31}{obj2,27}"
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Display the Decimal.ToOACurrency parameter and the result
+// or exception.
+let showDecimalToOACurrency argument =
+ // Catch the exception if ToOACurrency( ) throws one.
+ try
+ let oaCurrency = Decimal.ToOACurrency argument
+ dataFmt argument oaCurrency
+ with ex ->
+ dataFmt argument (getExceptionType ex)
+
+printfn
+ """This example of the Decimal.ToOACurrency() method generates
+the following output. It displays the argument as a decimal
+and the OLE Automation Currency value as a long.
+"""
+dataFmt "Argument" "OA Currency or Exception"
+dataFmt "--------" "------------------------"
+
+// Convert decimal values to OLE Automation Currency values.
+showDecimalToOACurrency 0M
+showDecimalToOACurrency 1M
+showDecimalToOACurrency 1.0000000000000000000000000000M
+showDecimalToOACurrency 100000000000000M
+showDecimalToOACurrency 100000000000000.00000000000000M
+showDecimalToOACurrency 10000000000000000000000000000M
+showDecimalToOACurrency 0.000000000123456789M
+showDecimalToOACurrency 0.123456789M
+showDecimalToOACurrency 123456789M
+showDecimalToOACurrency 123456789000000000M
+showDecimalToOACurrency 4294967295M
+showDecimalToOACurrency 18446744073709551615M
+showDecimalToOACurrency -79.228162514264337593543950335M
+showDecimalToOACurrency -79228162514264.337593543950335M
+
+
+// This example of the Decimal.ToOACurrency() method generates
+// the following output. It displays the argument as a decimal
+// and the OLE Automation Currency value as a long.
+//
+// Argument OA Currency or Exception
+// -------- ------------------------
+// 0 0
+// 1 10000
+// 1.0000000000000000000000000000 10000
+// 100000000000000 1000000000000000000
+// 100000000000000.00000000000000 1000000000000000000
+// 10000000000000000000000000000 OverflowException
+// 0.000000000123456789 0
+// 0.123456789 1235
+// 123456789 1234567890000
+// 123456789000000000 OverflowException
+// 4294967295 42949672950000
+// 18446744073709551615 OverflowException
+// -79.228162514264337593543950335 -792282
+// -79228162514264.337593543950335 -792281625142643376
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj
new file mode 100644
index 00000000000..7aecbf41458
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs
new file mode 100644
index 00000000000..db6c15bf1ae
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs
@@ -0,0 +1,127 @@
+open System
+open System.Globalization
+
+let callParse () =
+ //
+ // Parse an integer with thousands separators.
+ let value = "16,523,421"
+ let number = Decimal.Parse value
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '16,523,421' converted to 16523421.
+
+ // Parse a floating point value with thousands separators
+ let value = "25,162.1378"
+ let number = Decimal.Parse value
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '25,162.1378' converted to 25162.1378.
+
+ // Parse a floating point number with US currency symbol.
+ let value = "$16,321,421.75"
+ try
+ let number = Decimal.Parse value
+ printfn $"'{value}' converted to {number}."
+ with :? FormatException ->
+ printfn $"Unable to parse '{value}'."
+ // Displays:
+ // Unable to parse '$16,321,421.75'.
+
+ // Parse a number in exponential notation
+ let value = "1.62345e-02"
+ try
+ let number = Decimal.Parse value
+ printfn $"'{value}' converted to {number}."
+ with :? FormatException ->
+ printfn $"Unable to parse '{value}'."
+ // Displays:
+ // Unable to parse '1.62345e-02'.
+ //
+
+let callParseWithStyles () =
+ //
+ // Parse string with a floating point value using NumberStyles.None.
+ let value = "8694.12"
+ let style = NumberStyles.None
+ try
+ let number = Decimal.Parse(value, style)
+ printfn $"'{value}' converted to {number}."
+ with :? FormatException ->
+ printfn $"Unable to parse '{value}'."
+ // Displays:
+ // Unable to parse '8694.12'.
+
+ // Parse string with a floating point value and allow decimal point.
+ let style = NumberStyles.AllowDecimalPoint
+ let number = Decimal.Parse(value, style)
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '8694.12' converted to 8694.12.
+
+ // Parse string with negative value in parentheses
+ let value = "(1,789.34)"
+ let style =
+ NumberStyles.AllowDecimalPoint |||
+ NumberStyles.AllowThousands |||
+ NumberStyles.AllowParentheses
+ let number = Decimal.Parse(value, style)
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '(1,789.34)' converted to -1789.34.
+
+ // Parse string using Number style
+ let value = " -17,623.49 "
+ let style = NumberStyles.Number
+ let number = Decimal.Parse(value, style)
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // ' -17,623.49 ' converted to -17623.49.
+ //
+
+let callParseWithStylesAndProvider () =
+ //
+ // Parse string using " " as the thousands separator
+ // and "," as the decimal separator for fr-FR culture.
+ let value = "892 694,12"
+ let style = NumberStyles.AllowDecimalPoint ||| NumberStyles.AllowThousands
+ let provider = CultureInfo "fr-FR"
+
+ let number = Decimal.Parse(value, style, provider)
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '892 694,12' converted to 892694.12.
+
+ try
+ let number = Decimal.Parse(value, style, CultureInfo.InvariantCulture)
+ printfn $"'{value}' converted to {number}."
+ with :? FormatException ->
+ printfn $"Unable to parse '{value}'."
+ // Displays:
+ // Unable to parse '892 694,12'.
+
+ // Parse string using "$" as the currency symbol for en-GB and
+ // en-US cultures.
+ let value = "$6,032.51"
+ let style = NumberStyles.Number ||| NumberStyles.AllowCurrencySymbol
+ let provider = CultureInfo "en-GB"
+
+ try
+ let number = Decimal.Parse(value, style, provider)
+ printfn $"'{value}' converted to {number}."
+ with :? FormatException ->
+ printfn $"Unable to parse '{value}'."
+ // Displays:
+ // Unable to parse '$6,032.51'.
+
+ let provider = CultureInfo "en-US"
+ let number = Decimal.Parse(value, style, provider)
+ printfn $"'{value}' converted to {number}."
+ // Displays:
+ // '$6,032.51' converted to 6032.51.
+ //
+
+callParse ()
+printfn "-----"
+callParseWithStyles ()
+printfn "-----"
+callParseWithStylesAndProvider ()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs
new file mode 100644
index 00000000000..9678e599926
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs
@@ -0,0 +1,122 @@
+open System
+open System.Globalization
+
+let callDefaultToString () =
+ //
+ let value = -16325.62m
+ // Display value using default ToString method.
+ printfn $"{value.ToString()}" // Displays -16325.62
+ // Display value using some standard format specifiers.
+ printfn $"""{value.ToString "G"}""" // Displays -16325.62
+ printfn $"""{value.ToString "C"}""" // Displays ($16,325.62)
+ printfn $"""{value.ToString "F"}""" // Displays -16325.62
+ //
+
+let callToStringWithSpecificCultures () =
+ //
+ let value = -16325.62m
+ // Display value using the invariant culture.
+ printfn $"{value.ToString CultureInfo.InvariantCulture}"
+ // Display value using the en-GB culture.
+ printfn $"""{value.ToString(CultureInfo.CreateSpecificCulture "en-GB")}"""
+ // Display value using the de-DE culture.
+ printfn $"""{value.ToString(CultureInfo.CreateSpecificCulture "de-DE")}"""
+ // This example displays the following output to the console:
+ // -16325.62
+ // -16325.62
+ // -16325,62
+ //
+
+let callWithSpecificSpecifiers () =
+ //
+ let value = 16325.62m
+
+ // Use standard numeric format specifiers.
+ let specifier = "G"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: G: 16325.62
+ let specifier = "C"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: C: $16,325.62
+ let specifier = "E04"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: E04: 1.6326E+004
+ let specifier = "F"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: F: 16325.62
+ let specifier = "N"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: N: 16,325.62
+ let specifier = "P"
+ printfn $"{specifier}: {(value / 10000m).ToString specifier}"
+ // Displays: P: 163.26 %
+
+ // Use custom numeric format specifiers.
+ let specifier = "0,0.000"
+ printfn $"{specifier}: {value.ToString specifier}"
+ // Displays: 0,0.000: 16,325.620
+ let specifier = "#,#.00#(#,#.00#)"
+ printfn $"{specifier}: {(value * -1m).ToString specifier}"
+ // Displays: #,#.00#(#,#.00#): (16,325.62)
+ //
+
+let callWithSpecificSpecifiersAndCultures () =
+ //
+ let value = 16325.62m
+
+ // Use standard numeric format specifiers.
+ let specifier = "G"
+ let culture = CultureInfo.CreateSpecificCulture "eu-ES"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 16325,62
+ Console.WriteLine(value.ToString(specifier, CultureInfo.InvariantCulture))
+ // Displays: 16325.62
+
+ let specifier = "C"
+ let culture = CultureInfo.CreateSpecificCulture "en-US"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: $16,325.62
+ let culture = CultureInfo.CreateSpecificCulture "en-GB"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: £16,325.62
+
+ let specifier = "E04"
+ let culture = CultureInfo.CreateSpecificCulture "sv-SE"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 1,6326E+004
+ let culture = CultureInfo.CreateSpecificCulture "en-NZ"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 1.6326E+004
+
+ let specifier = "F"
+ let culture = CultureInfo.CreateSpecificCulture "fr-FR"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 16325,62
+ let culture = CultureInfo.CreateSpecificCulture "en-CA"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 16325.62
+
+ let specifier = "N"
+ let culture = CultureInfo.CreateSpecificCulture "es-ES"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 16.325,62
+ let culture = CultureInfo.CreateSpecificCulture "fr-CA"
+ Console.WriteLine(value.ToString(specifier, culture))
+ // Displays: 16 325,62
+
+ let specifier = "P"
+ let culture = CultureInfo.InvariantCulture
+ printfn $"{(value / 10000m).ToString(specifier, culture)}"
+ // Displays: 163.26 %
+ let culture = CultureInfo.CreateSpecificCulture "ar-EG"
+ printfn $"{(value / 10000m).ToString(specifier, culture)}"
+ // Displays: 163.256 %
+ //
+
+callDefaultToString()
+printfn "-----"
+callToStringWithSpecificCultures()
+printfn "-----"
+callWithSpecificSpecifiers()
+printfn "-----"
+callWithSpecificSpecifiersAndCultures()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj
new file mode 100644
index 00000000000..bd48594efd1
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj
new file mode 100644
index 00000000000..6351d55369f
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs
new file mode 100644
index 00000000000..069d729fa8a
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs
@@ -0,0 +1,55 @@
+//
+// Example of the Decimal.ToSingle and Decimal.ToDouble methods.
+open System
+
+let formatter obj1 obj2 obj3 = printfn $"{obj1,30}{obj2,17}{obj3,23}"
+
+// Convert the decimal argument no exceptions are thrown.
+let decimalToSgl_Dbl argument =
+ // Convert the argument to a float value.
+ let singleValue = Decimal.ToSingle argument
+
+ // Convert the argument to a double value.
+ let doubleValue = Decimal.ToDouble argument
+
+ formatter argument singleValue doubleValue
+
+printfn
+ """This example of the
+ Decimal.ToSingle( decimal ) and
+ Decimal.ToDouble( decimal )
+methods generates the following output. It
+displays several converted decimal values.
+"""
+
+formatter "decimal argument" "float" "double"
+formatter "----------------" "-----" "------"
+
+// Convert decimal values and display the results.
+decimalToSgl_Dbl 0.0000000000000000000000000001M
+decimalToSgl_Dbl 0.0000000000123456789123456789M
+decimalToSgl_Dbl 123M
+decimalToSgl_Dbl (Decimal(123000000, 0, 0, false, 6uy))
+decimalToSgl_Dbl 123456789.123456789M
+decimalToSgl_Dbl 123456789123456789123456789M
+decimalToSgl_Dbl Decimal.MinValue
+decimalToSgl_Dbl Decimal.MaxValue
+
+
+// This example of the
+// Decimal.ToSingle( decimal ) and
+// Decimal.ToDouble( decimal )
+// methods generates the following output. It
+// displays several converted decimal values.
+//
+// decimal argument float double
+// ---------------- ----- ------
+// 0.0000000000000000000000000001 1E-28 1E-28
+// 0.0000000000123456789123456789 1.234568E-11 1.23456789123457E-11
+// 123 123 123
+// 123.000000 123 123
+// 123456789.123456789 1.234568E+08 123456789.123457
+// 123456789123456789123456789 1.234568E+26 1.23456789123457E+26
+// -79228162514264337593543950335 -7.922816E+28 -7.92281625142643E+28
+// 79228162514264337593543950335 7.922816E+28 7.92281625142643E+28
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs
new file mode 100644
index 00000000000..c7a426235ff
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs
@@ -0,0 +1,93 @@
+open System
+open System.Globalization
+
+let callTryParse1 () =
+ //
+ // Parse a floating-point value with a thousands separator.
+ let value = "1,643.57"
+ match Decimal.TryParse value with
+ | true, number ->
+ printfn $"{number}"
+ | _ ->
+ printfn $"Unable to parse '{value}'."
+
+ // Parse a floating-point value with a currency symbol and a
+ // thousands separator.
+ let value = "$1,643.57"
+ match Decimal.TryParse value with
+ | true, number ->
+ printfn $"{number}"
+ | _ ->
+ printfn $"Unable to parse '{value}'."
+
+ // Parse value in exponential notation.
+ let value = "-1.643e6"
+ match Decimal.TryParse value with
+ | true, number ->
+ printfn $"{number}"
+ | _ ->
+ printfn $"Unable to parse '{value}'."
+
+ // Parse a negative integer value.
+ let value = "-1689346178821"
+ match Decimal.TryParse value with
+ | true, number ->
+ printfn $"{number}"
+ | _ ->
+ printfn $"Unable to parse '{value}'."
+ // The example displays the following output to the console:
+ // 1643.57
+ // Unable to parse '$1,643.57'.
+ // Unable to parse '-1.643e6'.
+ // -1689346178821
+ //
+
+let callTryParse2 () =
+ //
+ // Parse currency value using en-GB culture.
+ let value = "£1,097.63"
+ let style = NumberStyles.Number ||| NumberStyles.AllowCurrencySymbol
+ let culture = CultureInfo.CreateSpecificCulture "en-GB"
+ match Decimal.TryParse(value, style, culture) with
+ | true, number ->
+ printfn $"Converted '{value}' to {number}."
+ | _ ->
+ printfn $"Unable to convert '{value}'."
+ // Displays:
+ // Converted '£1,097.63' to 1097.63.
+
+ let value = "1345,978"
+ let style = NumberStyles.AllowDecimalPoint
+ let culture = CultureInfo.CreateSpecificCulture "fr-FR"
+ match Decimal.TryParse(value, style, culture) with
+ | true, number ->
+ printfn $"Converted '{value}' to {number}."
+ | _ ->
+ printfn $"Unable to convert '{value}'."
+ // Displays:
+ // Converted '1345,978' to 1345.978.
+
+ let value = "1.345,978"
+ let style = NumberStyles.AllowDecimalPoint ||| NumberStyles.AllowThousands
+ let culture = CultureInfo.CreateSpecificCulture "es-ES"
+ match Decimal.TryParse(value, style, culture) with
+ | true, number ->
+ printfn $"Converted '{value}' to {number}."
+ | _ ->
+ printfn $"Unable to convert '{value}'."
+ // Displays:
+ // Converted '1.345,978' to 1345.978.
+
+ let value = "1 345,978"
+ match Decimal.TryParse(value, style, culture) with
+ | true, number ->
+ printfn $"Converted '{value}' to {number}."
+ | _ ->
+ printfn $"Unable to convert '{value}'."
+ // Displays:
+ // Unable to convert '1 345,978'.
+ //
+
+callTryParse1 ()
+printfn "----------"
+callTryParse2 ()
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj
new file mode 100644
index 00000000000..f280b3ec57e
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs
new file mode 100644
index 00000000000..25b385133a7
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs
@@ -0,0 +1,16 @@
+//
+open System
+
+let values = [ 1234.96m; -1234.96m ]
+for value in values do
+ let parts = Decimal.GetBits value
+ let sign = (parts[3] &&& 0x80000000) <> 0
+
+ let scale = (parts[3] >>> 16) &&& 0x7F |> byte
+ let newValue = Decimal(parts[0], parts[1], parts[2], sign, scale)
+ printfn $"{value} --> {newValue}"
+
+// The example displays the following output:
+// 1234.96 --> 1234.96
+// -1234.96 --> -1234.96
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
new file mode 100644
index 00000000000..84395e0bcc5
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs
new file mode 100644
index 00000000000..3d8bf74fecf
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs
@@ -0,0 +1,78 @@
+//
+let value = 112m
+
+let testObjectForEquality (obj: obj) =
+ printfn $"{value} ({value.GetType().Name}) = {obj} ({obj.GetType().Name}): {value.Equals obj}\n"
+
+let byte1 = 112uy
+printfn $"value = byte1: {value.Equals byte1,17}"
+testObjectForEquality byte1
+
+let short1 = 112s
+printfn $"value = short1: {value.Equals short1,17}"
+testObjectForEquality short1
+
+let int1 = 112
+printfn $"value = int1: {value.Equals int1,19}"
+testObjectForEquality int1
+
+let long1 = 112L
+printfn $"value = long1: {value.Equals long1,18}"
+testObjectForEquality long1
+
+let sbyte1 = 112y
+printfn $"value = sbyte1: {value.Equals sbyte1,17}"
+testObjectForEquality sbyte1
+
+let ushort1 = 112us
+printfn $"value = ushort1: {value.Equals ushort1,17}"
+testObjectForEquality ushort1
+
+let uint1 = 112u
+printfn $"value = uint1: {value.Equals uint1,19}"
+testObjectForEquality uint1
+
+let ulong1 = 112uL
+printfn $"value = ulong1: {value.Equals ulong1,18}"
+testObjectForEquality ulong1
+
+let sng1 = 112f
+printfn $"value = sng1: {value.Equals sng1,21}"
+testObjectForEquality sng1
+
+let dbl1 = 112.
+printfn $"value = dbl1: {value.Equals dbl1,21}"
+testObjectForEquality dbl1
+
+
+// The example displays the following output:
+// value = byte1: True
+// 112 (Decimal) = 112 (Byte): False
+//
+// value = short1: True
+// 112 (Decimal) = 112 (Int16): False
+//
+// value = int1: True
+// 112 (Decimal) = 112 (Int32): False
+//
+// value = long1: True
+// 112 (Decimal) = 112 (Int64): False
+//
+// value = sbyte1: True
+// 112 (Decimal) = 112 (SByte): False
+//
+// value = ushort1: True
+// 112 (Decimal) = 112 (UInt16): False
+//
+// value = uint1: True
+// 112 (Decimal) = 112 (UInt32): False
+//
+// value = ulong1: True
+// 112 (Decimal) = 112 (UInt64): False
+//
+// value = sng1: False
+// 112 (Decimal) = 112 (Single): False
+//
+// value = dbl1: False
+// 112 (Decimal) = 112 (Double): False
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj
new file mode 100644
index 00000000000..f1da800c5f5
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
new file mode 100644
index 00000000000..c48e29749ad
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs
new file mode 100644
index 00000000000..2ecd8a73cf0
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs
@@ -0,0 +1,30 @@
+module tosbyte
+
+//
+open System
+
+// Define a list of decimal values.
+let values =
+ [ 78m; Decimal(78000, 0, 0, false, 3uy)
+ 78.999m; 255.999m; 256m; 127.999m
+ 128m; -0.999m; -1m; -128.999m; -129m ]
+for value in values do
+ try
+ let byteValue = int8 value
+ printfn $"{value} ({value.GetType().Name}) --> {byteValue} ({byteValue.GetType().Name})"
+ with :? OverflowException ->
+ printfn $"OverflowException: Cannot convert {value}"
+
+// The example displays the following output:
+// 78 (Decimal) --> 78 (SByte)
+// 78.000 (Decimal) --> 78 (SByte)
+// 78.999 (Decimal) --> 78 (SByte)
+// OverflowException: Cannot convert 255.999
+// OverflowException: Cannot convert 256
+// 127.999 (Decimal) --> 127 (SByte)
+// OverflowException: Cannot convert 128
+// -0.999 (Decimal) --> 0 (SByte)
+// -1 (Decimal) --> -1 (SByte)
+// -128.999 (Decimal) --> -128 (SByte)
+// OverflowException: Cannot convert -129
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs
new file mode 100644
index 00000000000..950dfae8432
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs
@@ -0,0 +1,29 @@
+module tosingle1
+
+//
+open System
+
+// Define a list of decimal values.
+let values =
+ [ 0.0000000000000000000000000001M
+ 0.0000000000123456789123456789M
+ 123M; Decimal(123000000, 0, 0, false, 6uy)
+ 123456789.123456789M
+ 123456789123456789123456789M
+ Decimal.MinValue; Decimal.MaxValue ]
+
+// Convert each value to a double.
+for value in values do
+ let dblValue = float32 value
+ printfn $"{value} ({value.GetType().Name}) --> {dblValue} ({dblValue.GetType().Name})"
+
+// The example displays the following output:
+// 0.0000000000000000000000000001 (Decimal) --> 1E-28 (Single)
+// 0.0000000000123456789123456789 (Decimal) --> 1.234568E-11 (Single)
+// 123 (Decimal) --> 123 (Single)
+// 123.000000 (Decimal) --> 123 (Single)
+// 123456789.123456789 (Decimal) --> 1.234568E+08 (Single)
+// 123456789123456789123456789 (Decimal) --> 1.234568E+26 (Single)
+// -79228162514264337593543950335 (Decimal) --> -7.922816E+28 (Single)
+// 79228162514264337593543950335 (Decimal) --> 7.922816E+28 (Single)
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs
new file mode 100644
index 00000000000..ee34f488246
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs
@@ -0,0 +1,11 @@
+module addition1
+
+//
+let number1 = 120.07m
+let number2 = 163.19m
+let number3 = number1 + number2
+printfn $"{number1} + {number2} = {number3}"
+
+// The example displays the following output:
+// 120.07 + 163.19 = 283.26
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs
new file mode 100644
index 00000000000..b5534dcb6a4
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs
@@ -0,0 +1,11 @@
+module decrement1
+
+//
+let number = 1079.8m
+printfn $"Original value: {number:N}"
+printfn $"Decremented value: {- -number:N}"
+
+// The example displays the following output:
+// Original value: 1,079.80
+// Decremented value: 1,078.80
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs
new file mode 100644
index 00000000000..65f48149783
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs
@@ -0,0 +1,13 @@
+module decrement2
+
+//
+open System
+
+let number = 1079.8m
+printfn $"Original value: {number:N}"
+printfn $"Decremented value: {Decimal.Subtract(number, 1):N}"
+
+// The example displays the following output:
+// Original value: 1,079.80
+// Decremented value: 1,078.80
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs
new file mode 100644
index 00000000000..e4dcf957491
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs
@@ -0,0 +1,11 @@
+module division1
+
+//
+let number1 = 16.8m
+let number2 = 4.1m
+let number3 = number1 / number2
+printfn $"{number1:N2} / {number2:N2} = {number3:N2}"
+
+// The example displays the following output:
+// 16.80 / 4.10 = 4.10
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs
new file mode 100644
index 00000000000..e327b0b9404
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs
@@ -0,0 +1,17 @@
+module equality1
+
+//
+open System
+
+let number1 = 16354.0695m
+let number2 = 16354.0699m
+printfn $"{number1} = {number2}: {number1 = number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{rounded1} = {rounded2}: {rounded1 = rounded2}"
+
+// The example displays the following output:
+// 16354.0695 = 16354.0699: False
+// 16354.07 = 16354.07: True
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj
new file mode 100644
index 00000000000..642e6efd963
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj
@@ -0,0 +1,23 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs
new file mode 100644
index 00000000000..f0ec66415a7
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs
@@ -0,0 +1,17 @@
+module greaterthan1
+
+//
+open System
+
+let number1 = 16354.0699m
+let number2 = 16354.0695m
+printfn $"{number1} > {number2}: {number1 > number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{number1} > {number2}: {number1 > number2}"
+
+// The example displays the following output:
+// 16354.0699 > 16354.0695: True
+// 16354.07 > 16354.07: False
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs
new file mode 100644
index 00000000000..698e9044f1b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs
@@ -0,0 +1,17 @@
+module greaterthanorequal1
+
+//
+open System
+
+let number1 = 16354.0699m
+let number2 = 16354.0695m
+printfn $"{number1} >= {number2}: {number1 >= number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{number1} >= {number2}: {number1 >= number2}"
+
+// The example displays the following output:
+// 16354.0699 >= 16354.0695: True
+// 16354.07 >= 16354.07: True
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs
new file mode 100644
index 00000000000..d1cc07f495b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs
@@ -0,0 +1,13 @@
+module increment1
+
+//
+open System
+
+let number = 1079.8m
+printfn $"Original value: {number:N}"
+printfn $"Incremented value: {Decimal.op_Increment number:N}"
+
+// The example displays the following output:
+// Original value: 1,079.80
+// Incremented value: 1,080.80
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs
new file mode 100644
index 00000000000..ac358c7c4e5
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs
@@ -0,0 +1,13 @@
+module increment2
+
+//
+open System
+
+let number = 1079.8m
+printfn $"Original value: {number:N}"
+printfn $"Incremented value: {Decimal.Add(number, 1):N}"
+
+// The example displays the following output:
+// Original value: 1,079.80
+// Incremented value: 1,080.80
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs
new file mode 100644
index 00000000000..b6a10f835a9
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs
@@ -0,0 +1,17 @@
+module inequality1
+
+//
+open System
+
+let number1 = 16354.0695m
+let number2 = 16354.0699m
+printfn $"{number1} <> {number2}: {number1 <> number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{rounded1} <> {rounded2}: {rounded1 <> rounded2}"
+
+// The example displays the following output:
+// 16354.0695 <> 16354.0699: True
+// 16354.07 <> 16354.07: False
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs
new file mode 100644
index 00000000000..c55a3bc4fcc
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs
@@ -0,0 +1,17 @@
+module lessthan1
+
+//
+open System
+
+let number1 = 16354.0699m
+let number2 = 16354.0695m
+printfn $"{number1} < {number2}: {number1 < number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{rounded1} < {rounded2}: {rounded1 < rounded2}"
+
+// The example displays the following output:
+// 16354.0699 < 16354.0695: False
+// 16354.07 < 16354.07: False
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs
new file mode 100644
index 00000000000..af5bb288605
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs
@@ -0,0 +1,17 @@
+module lessthanorequal1
+
+//
+open System
+
+let number1 = 16354.0699m
+let number2 = 16354.0695m
+printfn $"{number1} <= {number2}: {number1 <= number2}"
+
+let rounded1 = Decimal.Round(number1, 2)
+let rounded2 = Decimal.Round(number2, 2)
+printfn $"{rounded1} <= {rounded2}: {rounded1 <= rounded2}"
+
+// The example displays the following output:
+// 16354.0699 <= 16354.0695: False
+// 16354.07 <= 16354.07: True
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs
new file mode 100644
index 00000000000..ed1fe5749ef
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs
@@ -0,0 +1,11 @@
+module modulus
+
+//
+let number1 = 16.8m
+let number2 = 4.1m
+let number3 = number1 % number2
+printfn $"{number1:N2} %% {number2:N2} = {number3:N2}"
+
+// The example displays the following output:
+// 16.80 % 4.10 = 0.40
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs
new file mode 100644
index 00000000000..ca0a1b10eed
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs
@@ -0,0 +1,11 @@
+module multiply1
+
+//
+let number1 = 16.8m
+let number2 = 4.1m
+let number3 = number1 * number2
+printfn $"{number1:N2} x {number2:N2} = {number3:N2}"
+
+// The example displays the following output:
+// 16.80 x 4.10 = 68.88
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs
new file mode 100644
index 00000000000..4ebaddcd8ce
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs
@@ -0,0 +1,11 @@
+module subtraction1
+
+//
+let number1 = 120.07m
+let number2 = 163.19m
+let number3 = number1 - number2
+printfn $"{number1} - {number2} = {number3}"
+
+// The example displays the following output:
+// 120.07 - 163.19 = -43.12
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj
new file mode 100644
index 00000000000..45e9c202c94
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs
new file mode 100644
index 00000000000..15f06d4f24b
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs
@@ -0,0 +1,22 @@
+//
+open System
+
+// Create parallel lists of Decimals to use as the dividend and divisor.
+let dividends =
+ [ 79m; 1000m; -1000m; 123m; 1234567800000m; 1234.0123m ]
+let divisors =
+ [ 11m; 7m; 7m; 0.00123m; 0.12345678m; 1234.5678m ]
+
+for i = 0 to dividends.Length - 1 do
+ let dividend = dividends[i]
+ let divisor = divisors[i]
+ printfn $"{dividend:N3} / {divisor:N3} = {Decimal.Divide(dividend, divisor):N3} Remainder {Decimal.Remainder(dividend, divisor):N3}"
+
+// The example displays the following output:
+// 79.000 / 11.000 = 7.182 Remainder 2.000
+// 1,000.000 / 7.000 = 142.857 Remainder 6.000
+// -1,000.000 / 7.000 = -142.857 Remainder -6.000
+// 123.000 / 0.001 = 100,000.000 Remainder 0.000
+// 1,234,567,800,000.000 / 0.123 = 10,000,000,000,000.000 Remainder 0.000
+// 1,234.012 / 1,234.568 = 1.000 Remainder 1,234.012
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj
new file mode 100644
index 00000000000..fda79617c38
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs
new file mode 100644
index 00000000000..74cb2f2015c
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs
@@ -0,0 +1,29 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(78000, 0, 0, false, 3uy)
+ 78.999m; 255.999m; 256m
+ 127.999m; 128m; -0.999m
+ -1m; -128.999m; -129m ]
+
+for value in values do
+ try
+ let number = Decimal.ToByte value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 78 --> 78
+// 78.000 --> 78
+// 78.999 --> 78
+// 255.999 --> 255
+// OverflowException: 256
+// 127.999 --> 127
+// 128 --> 128
+// -0.999 --> 0
+// OverflowException: -1
+// OverflowException: -128.999
+// OverflowException: -129
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj
new file mode 100644
index 00000000000..afbd917e787
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs
new file mode 100644
index 00000000000..6826511da6d
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs
@@ -0,0 +1,29 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 65535.999m; 65536m
+ 32767.999m; 32768m; -0.999m
+ -1m; -32768.999m; -32769m ]
+
+for value in values do
+ try
+ let number = Decimal.ToInt16 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// OverflowException: 65535.999
+// OverflowException: 65536
+// 32767.999 --> 32767
+// OverflowException: 32768
+// -0.999 --> 0
+// -1 --> -1
+// -32768.999 --> -32768
+// OverflowException: -32769
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj
new file mode 100644
index 00000000000..78fc6ffa6b6
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs
new file mode 100644
index 00000000000..a114b9dace7
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs
@@ -0,0 +1,30 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 4294967295.999m; 4294967296m
+ 4294967296m; 2147483647.999m; 2147483648m
+ -0.999m; -1m; -2147483648.999m; -2147483649m ]
+
+for value in values do
+ try
+ let number = Decimal.ToInt32 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// OverflowException: 4294967295.999
+// OverflowException: 4294967296
+// OverflowException: 4294967296
+// 2147483647.999 --> 2147483647
+// OverflowException: 2147483648
+// -0.999 --> 0
+// -1 --> -1
+// -2147483648.999 --> -2147483648
+// OverflowException: -2147483649
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj
new file mode 100644
index 00000000000..90e94be3215
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs
new file mode 100644
index 00000000000..4a4d82ced63
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs
@@ -0,0 +1,31 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 18446744073709551615.999m
+ 18446744073709551616m; 9223372036854775807.999m
+ 9223372036854775808m; -0.999m; -1m
+ -9223372036854775808.999m
+ -9223372036854775809m ]
+
+for value in values do
+ try
+ let number = Decimal.ToInt64 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// OverflowException: 18446744073709551615.999
+// OverflowException: 18446744073709551616
+// 9223372036854775807.999 --> 9223372036854775807
+// OverflowException: 9223372036854775808
+// -0.999 --> 0
+// -1 --> -1
+// -9223372036854775808.999 --> -9223372036854775808
+// OverflowException: -9223372036854775809
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj
new file mode 100644
index 00000000000..88f316581c1
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs
new file mode 100644
index 00000000000..4aa2445e08d
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs
@@ -0,0 +1,29 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(78000, 0, 0, false, 3uy)
+ 78.999m; 255.999m; 256m
+ 127.999m; 128m; -0.999m
+ -1m; -128.999m; -129m ]
+
+for value in values do
+ try
+ let number = Decimal.ToSByte value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 78 --> 78
+// 78.000 --> 78
+// 78.999 --> 78
+// OverflowException: 255.999
+// OverflowException: 256
+// 127.999 --> 127
+// OverflowException: 128
+// -0.999 --> 0
+// -1 --> -1
+// -128.999 --> -128
+// OverflowException: -129
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj
new file mode 100644
index 00000000000..a321ec32264
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs
new file mode 100644
index 00000000000..da9ba97873f
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs
@@ -0,0 +1,29 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 65535.999m; 65536m;
+ 32767.999m; 32768m; -0.999m;
+ -1m; -32768.999m; -32769m ]
+
+for value in values do
+ try
+ let number = Decimal.ToUInt16 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// 65535.999 --> 65535
+// OverflowException: 65536
+// 32767.999 --> 32767
+// 32768 --> 32768
+// -0.999 --> 0
+// OverflowException: -1
+// OverflowException: -32768.999
+// OverflowException: -32769
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj
new file mode 100644
index 00000000000..f2f6b1dc748
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs
new file mode 100644
index 00000000000..aea0b7c37b1
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs
@@ -0,0 +1,30 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 4294967295.999m; 4294967296m
+ 4294967296m; 2147483647.999m; 2147483648m
+ -0.999m; -1m; -2147483648.999m; -2147483649m ]
+
+for value in values do
+ try
+ let number = Decimal.ToUInt32 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// 4294967295.999 --> 4294967295
+// OverflowException: 4294967296
+// OverflowException: 4294967296
+// 2147483647.999 --> 2147483647
+// 2147483648 --> 2147483648
+// -0.999 --> 0
+// OverflowException: -1
+// OverflowException: -2147483648.999
+// OverflowException: -2147483649
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj
new file mode 100644
index 00000000000..bca93484410
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj
@@ -0,0 +1,9 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs
new file mode 100644
index 00000000000..b14ce9b09fc
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs
@@ -0,0 +1,31 @@
+//
+open System
+
+let values =
+ [ 123m; Decimal(123000, 0, 0, false, 3uy)
+ 123.999m; 18446744073709551615.999m
+ 18446744073709551616m; 9223372036854775807.999m
+ 9223372036854775808m; -0.999m; -1m
+ -9223372036854775808.999m
+ -9223372036854775809m ]
+
+for value in values do
+ try
+ let number = Decimal.ToUInt64 value
+ printfn $"{value} --> {number}"
+ with :? OverflowException as e ->
+ printfn $"{e.GetType().Name}: {value}"
+
+// The example displays the following output:
+// 123 --> 123
+// 123.000 --> 123
+// 123.999 --> 123
+// 18446744073709551615.999 --> 18446744073709551615
+// OverflowException: 18446744073709551616
+// 9223372036854775807.999 --> 9223372036854775807
+// 9223372036854775808 --> 9223372036854775808
+// -0.999 --> 0
+// OverflowException: -1
+// OverflowException: -9223372036854775808.999
+// OverflowException: -9223372036854775809
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
new file mode 100644
index 00000000000..367dd5bca98
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
@@ -0,0 +1,10 @@
+
+
+ Exe
+ net6.0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs
new file mode 100644
index 00000000000..7ceb9105fd2
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs
@@ -0,0 +1,28 @@
+module midpoint1
+
+open System
+
+//
+printfn $"""{"Value",-10} {"Default",-10} {"ToEven",-10} {"AwayFromZero",-15} {"ToZero",-15}"""
+for value in 12m .. 0.1m .. 13m do
+ printfn "%-10O %-10O %-10O %-15O %-15O"
+ value
+ (Math.Round value)
+ (Math.Round(value, MidpointRounding.ToEven))
+ (Math.Round(value, MidpointRounding.AwayFromZero))
+ (Math.Round(value, MidpointRounding.ToZero))
+
+// The example displays the following output:
+// Value Default ToEven AwayFromZero ToZero
+// 12.0 12 12 12 12
+// 12.1 12 12 12 12
+// 12.2 12 12 12 12
+// 12.3 12 12 12 12
+// 12.4 12 12 12 12
+// 12.5 12 12 13 12
+// 12.6 13 13 13 12
+// 12.7 13 13 13 12
+// 12.8 13 13 13 12
+// 12.9 13 13 13 12
+// 13.0 13 13 13 13
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs
new file mode 100644
index 00000000000..37f67811202
--- /dev/null
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs
@@ -0,0 +1,78 @@
+module mpr
+
+// This example demonstrates the Math.Round() method in conjunction
+// with the MidpointRounding enumeration and decimal places.
+open System
+
+let decimalExample () =
+ //
+ // Round a positive value using different strategies.
+ // The precision of the result is 1 decimal place.
+
+ let result = Math.Round(3.45m, 1, MidpointRounding.ToEven)
+ printfn $"{result} = Math.Round({3.45m}, 1, MidpointRounding.ToEven)"
+ let result = Math.Round(3.45m, 1, MidpointRounding.AwayFromZero)
+ printfn $"{result} = Math.Round({3.45m}, 1, MidpointRounding.AwayFromZero)"
+ let result = Math.Round(3.47m, 1, MidpointRounding.ToZero)
+ printfn $"{result} = Math.Round({3.47m}, 1, MidpointRounding.ToZero)\n"
+
+ // Round a negative value using different strategies.
+ // The precision of the result is 1 decimal place.
+
+ let result = Math.Round(-3.45m, 1, MidpointRounding.ToEven)
+ printfn $"{result} = Math.Round({-3.45m}, 1, MidpointRounding.ToEven)"
+ let result = Math.Round(-3.45m, 1, MidpointRounding.AwayFromZero)
+ printfn $"{result} = Math.Round({-3.45m}, 1, MidpointRounding.AwayFromZero)"
+ let result = Math.Round(-3.47m, 1, MidpointRounding.ToZero)
+ printfn $"{result} = Math.Round({-3.47m}, 1, MidpointRounding.ToZero)\n"
+
+ // This code example produces the following results:
+
+ // 3.4 = Math.Round(3.45, 1, MidpointRounding.ToEven)
+ // 3.5 = Math.Round(3.45, 1, MidpointRounding.AwayFromZero)
+ // 3.4 = Math.Round(3.47, 1, MidpointRounding.ToZero)
+
+ // -3.4 = Math.Round(-3.45, 1, MidpointRounding.ToEven)
+ // -3.5 = Math.Round(-3.45, 1, MidpointRounding.AwayFromZero)
+ // -3.4 = Math.Round(-3.47, 1, MidpointRounding.ToZero)
+
+ //
+
+let doubleExample () =
+ //
+ // Round a positive and a negative value using the default.
+ let result = Math.Round(3.45, 1)
+ printfn $"{result,4} = Math.Round({3.45,5}, 1)"
+ let result = Math.Round(-3.45, 1)
+ printfn $"{result,4} = Math.Round({-3.45,5}, 1)\n"
+
+ // Round a positive value using a MidpointRounding value.
+ let result = Math.Round(3.45, 1, MidpointRounding.ToEven)
+ printfn $"{result,4} = Math.Round({3.45,5}, 1, MidpointRounding.ToEven)"
+ let result = Math.Round(3.45, 1, MidpointRounding.AwayFromZero)
+ printfn $"{result,4} = Math.Round({3.45,5}, 1, MidpointRounding.AwayFromZero)"
+ let result = Math.Round(3.47, 1, MidpointRounding.ToZero)
+ printfn $"{result,4} = Math.Round({3.47,5}, 1, MidpointRounding.ToZero)\n"
+
+ // Round a negative value using a MidpointRounding value.
+ let result = Math.Round(-3.45, 1, MidpointRounding.ToEven)
+ printfn $"{result,4} = Math.Round({-3.45,5}, 1, MidpointRounding.ToEven)"
+ let result = Math.Round(-3.45, 1, MidpointRounding.AwayFromZero)
+ printfn $"{result,4} = Math.Round({-3.45,5}, 1, MidpointRounding.AwayFromZero)"
+ let result = Math.Round(-3.47, 1, MidpointRounding.ToZero)
+ printfn $"{result,4} = Math.Round({-3.47,5}, 1, MidpointRounding.ToZero)\n"
+
+ // The example displays the following output:
+
+ // 3.4 = Math.Round( 3.45, 1)
+ // -3.4 = Math.Round(-3.45, 1)
+
+ // 3.4 = Math.Round(3.45, 1, MidpointRounding.ToEven)
+ // 3.5 = Math.Round(3.45, 1, MidpointRounding.AwayFromZero)
+ // 3.4 = Math.Round(3.47, 1, MidpointRounding.ToZero)
+
+ // -3.4 = Math.Round(-3.45, 1, MidpointRounding.ToEven)
+ // -3.5 = Math.Round(-3.45, 1, MidpointRounding.AwayFromZero)
+ // -3.4 = Math.Round(-3.47, 1, MidpointRounding.ToZero)
+
+ //
\ No newline at end of file
diff --git a/xml/System/Decimal.xml b/xml/System/Decimal.xml
index 479178f4e1d..59ad623e2d5 100644
--- a/xml/System/Decimal.xml
+++ b/xml/System/Decimal.xml
@@ -115,12 +115,14 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal1.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Class/cs/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet1":::
When the result of the division and multiplication is passed to the method, the result suffers no loss of precision, as the following code shows.
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal2.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Class/cs/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet2":::
A decimal number is a floating-point value that consists of a sign, a numeric value where each digit in the value ranges from 0 to 9, and a scaling factor that indicates the position of a floating decimal point that separates the integral and fractional parts of the numeric value.
@@ -152,6 +154,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Decimal Example/CS/source.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet1":::
]]>
@@ -240,6 +243,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctordo.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctordo.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctordo.vb" id="Snippet2":::
]]>
@@ -298,6 +302,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctori.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctori.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctori.vb" id="Snippet1":::
]]>
@@ -371,6 +376,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriarr.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriarr.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriarr.vb" id="Snippet1":::
]]>
@@ -431,6 +437,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorl.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorl.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorl.vb" id="Snippet3":::
]]>
@@ -523,6 +530,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctors.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctors.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctors.vb" id="Snippet1":::
]]>
@@ -587,6 +595,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorui.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorui.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorui.vb" id="Snippet2":::
]]>
@@ -645,6 +654,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorul.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CS/ctorul.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorul.vb" id="Snippet4":::
]]>
@@ -711,11 +721,13 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriiibby.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CS/ctoriiibby.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriiibby.vb" id="Snippet2":::
The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.ctor/cs/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
]]>
@@ -782,6 +794,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Decimal Example/CS/source.cs" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet5":::
]]>
@@ -845,6 +858,7 @@
The following example illustrates the method and contrasts it with the method.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/cs/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
]]>
@@ -932,6 +946,7 @@
The following example compares several values. Note that the first comparison indicates that the two values are equal despite the subtraction operation performed on the `value2` variable. This is because the type has 29 digits of precision, whereas a difference between these two values can be detected only with 30 digits of precision.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.Compare/cs/Compare1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Compare/vb/Compare1.vb" id="Snippet1":::
]]>
@@ -1129,6 +1144,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CS/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
]]>
@@ -1196,6 +1212,7 @@
The following example calls the method to divide a range of values by 22.1.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.Divide/cs/Divide1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Divide/vb/Divide1.vb" id="Snippet1":::
]]>
@@ -1290,6 +1307,7 @@
Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.equals/cs/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
@@ -1355,6 +1373,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CS/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
]]>
@@ -1363,6 +1382,7 @@
Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.equals/cs/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
@@ -1428,6 +1448,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/comp_equal.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CS/comp_equal.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/comp_equal.vb" id="Snippet2":::
]]>
@@ -1500,6 +1521,7 @@
The following example illustrates the method and contrasts it with the method.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/cs/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
]]>
@@ -1556,6 +1578,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CPP/fromoacurrency.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CS/fromoacurrency.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.OACurrency/VB/fromoacurrency.vb" id="Snippet2":::
]]>
@@ -1634,11 +1657,13 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/getbits.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CS/getbits.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/getbits.vb" id="Snippet2":::
The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.ctor/cs/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
]]>
@@ -1776,6 +1801,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/gettypecode.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CS/gettypecode.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/gettypecode.vb" id="Snippet3":::
]]>
@@ -1832,6 +1858,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Decimal Example/CS/source.cs" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet2":::
]]>
@@ -1887,6 +1914,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Fields/CS/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -1947,6 +1975,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Fields/CS/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -2015,6 +2044,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/CPP/mul_div_rem.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/CS/mul_div_rem.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/VB/mul_div_rem.vb" id="Snippet1":::
]]>
@@ -2079,6 +2109,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CPP/floor_neg_trunc.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CS/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/VB/floor_neg_trunc.vb" id="Snippet1":::
]]>
@@ -2130,6 +2161,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Fields/CS/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -2197,6 +2229,7 @@
The method defines the operation of the addition operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/addition1.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/addition1.vb" id="Snippet3":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2256,14 +2289,16 @@
The method defines the operation of the decrement operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/decrement1.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs" id="Snippet4":::
- Some languages (such as Visual Basic) that lack an increment operator can call the method directly, as the following example shows.
+ Some languages (such as Visual Basic and F#) that lack an increment operator can call the method directly, as the following example shows.
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement1.vb" id="Snippet5":::
If your language does not support custom operators, call the method instead, as the following example shows.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/decrement2.cs" interactive="try-dotnet" id="Snippet6":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs" id="Snippet6":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement2.vb" id="Snippet6":::
]]>
@@ -2329,6 +2364,7 @@
The method defines the operation of the division operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/division1.cs" interactive="try-dotnet" id="Snippet7":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs" id="Snippet7":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/division1.vb" id="Snippet7":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2399,6 +2435,7 @@
The method defines the operation of the equality operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/equality1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/equality1.vb" id="Snippet1":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2468,7 +2505,7 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2476,6 +2513,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctos_byte.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctos_byte.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctos_byte.vb" id="Snippet4":::
]]>
@@ -2538,6 +2576,7 @@
The following example converts numbers to values (Unicode characters) by using the explicit to conversion operator.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctochar.cs" interactive="try-dotnet" id="Snippet6":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs" id="Snippet6":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctochar.vb" id="Snippet6":::
]]>
@@ -2595,7 +2634,7 @@
## Remarks
This operation can result in a loss of precision, because a double-precision floating-point number has fewer significant digits than a .
- This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2603,6 +2642,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctosgl_dbl.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctosgl_dbl.cs" interactive="try-dotnet" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctosgl_dbl.vb" id="Snippet5":::
]]>
@@ -2657,7 +2697,7 @@
## Remarks
- This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, Visual Basic, and C++. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, F#, Visual Basic, and C++. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2665,6 +2705,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int16.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int16.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int16.vb" id="Snippet3":::
]]>
@@ -2720,7 +2761,7 @@
to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, F#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2728,6 +2769,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int32.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int32.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int32.vb" id="Snippet2":::
]]>
@@ -2783,13 +2825,14 @@
to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
The following example converts numbers to values by using the explicit to conversion operator.
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int64.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int64.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int64.vb" id="Snippet1":::
]]>
@@ -2853,7 +2896,7 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a and an value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the method or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a and an value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the method or the method.
## Examples
@@ -2861,6 +2904,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.decimal.operators.explicit/cpp/tosbyte.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/cs/tosbyte.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators.explicit/vb/tosbyte.vb" id="Snippet1":::
]]>
@@ -2919,7 +2963,7 @@
## Remarks
This operation can result in a loss of precision, because a single-precision floating-point number has fewer significant digits than a .
- This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2927,6 +2971,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.decimal.operators.explicit/cpp/tosingle1.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/cs/tosingle1.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators.explicit/vb/tosingle1.vb" id="Snippet2":::
]]>
@@ -2988,7 +3033,7 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -2996,6 +3041,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int16.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int16.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int16.vb" id="Snippet3":::
]]>
@@ -3059,7 +3105,7 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -3067,6 +3113,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int32.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int32.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int32.vb" id="Snippet2":::
]]>
@@ -3131,7 +3178,7 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C# and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
@@ -3139,6 +3186,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctou_int64.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CS/ctou_int64.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctou_int64.vb" id="Snippet1":::
]]>
@@ -3199,6 +3247,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CPP/cfromdouble.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CS/cfromdouble.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/VB/cfromdouble.vb" id="Snippet2":::
]]>
@@ -3262,6 +3311,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CPP/cfromsingle.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CS/cfromsingle.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/VB/cfromsingle.vb" id="Snippet3":::
]]>
@@ -3333,6 +3383,7 @@
The method defines the operation of the greater than operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/greaterthan1.cs" interactive="try-dotnet" id="Snippet8":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs" id="Snippet8":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/greaterthan1.vb" id="Snippet8":::
Languages that do not support custom operators can call the method instead. They may also be able to call the method directly, as the following example shows.
@@ -3402,6 +3453,7 @@
The method defines the operation of the greater than or equal operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/greaterthanorequal1.cs" interactive="try-dotnet" id="Snippet10":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs" id="Snippet10":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/greaterthanorequal1.vb" id="Snippet10":::
Languages that do not support custom operators can call the method instead. They may also be able to call the method directly, as the following example shows.
@@ -3487,6 +3539,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CPP/cfrombyte.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CS/cfrombyte.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/VB/cfrombyte.vb" id="Snippet4":::
]]>
@@ -3548,6 +3601,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CPP/cfromchar.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/CS/cfromchar.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/VB/cfromchar.vb" id="Snippet1":::
]]>
@@ -3609,6 +3663,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CPP/cfromint16.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CS/cfromint16.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/VB/cfromint16.vb" id="Snippet3":::
]]>
@@ -3670,6 +3725,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CPP/cfromint32.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CS/cfromint32.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/VB/cfromint32.vb" id="Snippet2":::
]]>
@@ -3731,6 +3787,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CPP/cfromint64.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CS/cfromint64.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/VB/cfromint64.vb" id="Snippet1":::
]]>
@@ -3800,6 +3857,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CPP/cfromsbyte.cpp" id="Snippet4":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/CS/cfromsbyte.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/VB/cfromsbyte.vb" id="Snippet4":::
]]>
@@ -3869,6 +3927,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CPP/cfromuint16.cpp" id="Snippet3":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CS/cfromuint16.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/VB/cfromuint16.vb" id="Snippet3":::
]]>
@@ -3938,6 +3997,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CPP/cfromuint32.cpp" id="Snippet2":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CS/cfromuint32.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/VB/cfromuint32.vb" id="Snippet2":::
]]>
@@ -4007,6 +4067,7 @@
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CPP/cfromuint64.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/CS/cfromuint64.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/VB/cfromuint64.vb" id="Snippet1":::
]]>
@@ -4063,6 +4124,7 @@
The method defines the operation of the increment operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/increment1.cs" interactive="try-dotnet" id="Snippet12":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs" id="Snippet12":::
Some languages (such as Visual Basic) that lack an increment operator can call the method directly, as the following example shows.
@@ -4071,6 +4133,7 @@
If your language does not support custom operators, call the method instead, as the following example shows.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/increment2.cs" interactive="try-dotnet" id="Snippet14":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs" id="Snippet14":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/increment2.vb" id="Snippet14":::
]]>
@@ -4137,6 +4200,7 @@
The method defines the operation of the inequality operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/inequality1.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/inequality1.vb" id="Snippet2":::
If the language you're using doesn't support custom operators, you can test for inequality by using one of the following techniques:
@@ -4209,6 +4273,7 @@
The method defines the operation of the less than operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/lessthan1.cs" interactive="try-dotnet" id="Snippet15":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs" id="Snippet15":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/lessthan1.vb" id="Snippet15":::
Languages that do not support custom operators can call the method instead. They may also be able to call the method directly, as the following example shows.
@@ -4278,6 +4343,7 @@
The method defines the operation of the less than or equal operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/lessthanorequal1.cs" interactive="try-dotnet" id="Snippet17":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs" id="Snippet17":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/lessthanorequal1.vb" id="Snippet17":::
Languages that do not support custom operators can call the method instead. They may also be able to call the method directly, as the following example shows.
@@ -4340,6 +4406,7 @@
The operator defines the remainder operation that returns the remainder resulting from dividing two specified values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/modulus1.cs" interactive="try-dotnet" id="Snippet19":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs" id="Snippet19":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/modulus1.vb" id="Snippet19":::
The sign of the value returned by the remainder operation depends on the sign of dividend. If dividend is positive, the remainder operation returns a positive result; if it is negative, the remainder operation returns a negative result.
@@ -4410,6 +4477,7 @@
The method defines the operation of the multiplication operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/multiply1.cs" interactive="try-dotnet" id="Snippet20":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs" id="Snippet20":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/multiply1.vb" id="Snippet20":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -4477,6 +4545,7 @@
The method defines the operation of the subtraction operator for values. It enables code such as the following:
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.operators/cs/subtraction1.cs" interactive="try-dotnet" id="Snippet21":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs" id="Snippet21":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/subtraction1.vb" id="Snippet21":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -4683,6 +4752,7 @@
The following code example uses the method to parse string representations of values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Parse/VB/parse.vb" id="Snippet1":::
]]>
@@ -4803,6 +4873,7 @@
The following code example uses the method to parse the string representations of values using the en-US culture.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Parse/VB/parse.vb" id="Snippet2":::
]]>
@@ -5066,6 +5137,7 @@
The following example uses a variety of `style` and `provider` parameters to parse the string representations of values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Parse/CS/parse.cs" interactive="try-dotnet-method" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Parse/VB/parse.vb" id="Snippet3":::
]]>
@@ -5138,6 +5210,7 @@
The following example uses the method to calculate the remainder in a series of division operations.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.remainder/cs/remainder.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.remainder/vb/remainder.vb" id="Snippet1":::
]]>
@@ -5200,10 +5273,13 @@
## Remarks
The behavior of this method follows IEEE Standard 754, section 4. This kind of rounding is sometimes called *round half to even* or *banker's rounding*. It minimizes rounding errors that result from consistently rounding a midpoint value in a single direction. It is equivalent to calling the method with a `mode` argument of .
+ In F#, the `ceil` function may be used instead.
+
## Examples
The following example rounds a range of values between 100 and 102 to the nearest integer. Because the method uses banker's rounding, 100.5 rounds to 100 and 101.5 rounds to 102.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/System.Decimal.Round/cs/Round1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Round/vb/Round1.vb" id="Snippet1":::
]]>
@@ -5269,6 +5345,7 @@ This method is equivalent to calling the
@@ -5337,6 +5414,7 @@ If you specify or method with different `mode` arguments.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.math.round.overload/cs/midpoint1.cs" interactive="try-dotnet-method" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.math.round.overload/vb/midpoint1.vb" id="Snippet5":::
]]>
@@ -5407,6 +5485,7 @@ If you specify or method with the enumeration.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.math.round.overload/cs/mpr.cs" interactive="try-dotnet-method" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.math.round.overload/vb/mpr.vb" id="Snippet1":::
]]>
@@ -5477,6 +5556,7 @@ If you specify or
@@ -6557,7 +6637,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
Parameter `value` is rounded to the nearest integer value toward zero, and that result is returned.
- You can also convert a value to an 8-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to an 8-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6565,6 +6645,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.tobyte/cs/tobyte_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.tobyte/vb/tobyte_1.vb" id="Snippet1":::
]]>
@@ -6628,7 +6709,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
This operation can produce round-off errors because a double-precision floating-point number has fewer significant digits than a .
- You can also convert a to a value by using the assignment operator. Because the conversion can entail a loss of precision, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a to a value by using the assignment operator. Because the conversion can entail a loss of precision, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6637,6 +6718,7 @@ This member is an explicit interface member implementation. It can be used only
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.ToXXX/CPP/tosgl_dbl.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/CS/tosgl_dbl.cs" interactive="try-dotnet" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToXXX/VB/tosgl_dbl.vb" id="Snippet5":::
]]>
@@ -6690,7 +6772,7 @@ This member is an explicit interface member implementation. It can be used only
value to a 16-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to a 16-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6698,6 +6780,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.toint16/cs/toint16_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.toint16/vb/toint16_1.vb" id="Snippet1":::
]]>
@@ -6761,7 +6844,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The return value is the integral part of the decimal value; fractional digits are truncated.
- You can also convert a value to a 32-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to a 32-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6769,6 +6852,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.toint32/cs/toint32_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.toint32/vb/toint32_1.vb" id="Snippet1":::
]]>
@@ -6832,7 +6916,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The return value is the integral part of the decimal value; fractional digits are truncated.
- You can also convert a value to a 64-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to a 64-bit integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6840,6 +6924,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.toint64/cs/toint64_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.toint64/vb/toint64_1.vb" id="Snippet1":::
]]>
@@ -6895,6 +6980,7 @@ This member is an explicit interface member implementation. It can be used only
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CPP/tooacurrency.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CS/tooacurrency.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.OACurrency/VB/tooacurrency.vb" id="Snippet1":::
]]>
@@ -6954,7 +7040,7 @@ This member is an explicit interface member implementation. It can be used only
value to an 8-bit signed integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to an 8-bit signed integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -6962,6 +7048,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.tosbyte/cs/tosbyte1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.tosbyte/vb/tosbyte1.vb" id="Snippet1":::
]]>
@@ -7026,7 +7113,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
This operation can produce round-off errors because a single-precision floating-point number has fewer significant digits than a .
- You can also convert a to a value by using the assignment operator. Because the conversion can entail a loss of precision, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a to a value by using the assignment operator. Because the conversion can entail a loss of precision, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -7035,6 +7122,7 @@ This member is an explicit interface member implementation. It can be used only
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.ToXXX/CPP/tosgl_dbl.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/CS/tosgl_dbl.cs" interactive="try-dotnet" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToXXX/VB/tosgl_dbl.vb" id="Snippet5":::
]]>
@@ -7124,12 +7212,14 @@ This member is an explicit interface member implementation. It can be used only
The following example displays a value using the default method. It also displays the string representations of the value that result from using a number of standard format specifiers.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToString/CS/ToString2.cs" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToString/VB/ToString2.vb" id="Snippet2":::
The following example displays the amount of money in an account.
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet5":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Decimal Example/CS/source.cs" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet5":::
]]>
@@ -7221,6 +7311,7 @@ This member is an explicit interface member implementation. It can be used only
The following example displays the string representation of a value using objects that represent several different cultures.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToString/CS/ToString2.cs" interactive="try-dotnet-method" id="Snippet3":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs" id="Snippet3":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToString/VB/ToString2.vb" id="Snippet3":::
]]>
@@ -7307,6 +7398,7 @@ This member is an explicit interface member implementation. It can be used only
The following example displays a value using each of the supported standard numeric format specifiers, together with two custom numeric format strings. In converting the numeric values to strings, the example uses the formatting conventions of the en-US culture.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToString/CS/ToString2.cs" id="Snippet4":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs" id="Snippet4":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToString/VB/ToString2.vb" id="Snippet4":::
]]>
@@ -7402,6 +7494,7 @@ This member is an explicit interface member implementation. It can be used only
The following example displays a value using each of the supported standard numeric format specifiers for several different cultures.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.ToString/CS/ToString2.cs" interactive="try-dotnet-method" id="Snippet5":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs" id="Snippet5":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.ToString/VB/ToString2.vb" id="Snippet5":::
]]>
@@ -7469,7 +7562,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The return value is the integral part of the decimal value; fractional digits are truncated.
- You can also convert a value to a 16-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to a 16-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -7477,6 +7570,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.touint16/cs/touint16_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.touint16/vb/touint16_1.vb" id="Snippet1":::
]]>
@@ -7545,7 +7639,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The return value is the integral part of the decimal value; fractional digits are truncated.
- You can also convert a value to an 32-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to an 32-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -7553,6 +7647,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.touint32/cs/touint32_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.touint32/vb/touint32_1.vb" id="Snippet1":::
]]>
@@ -7621,7 +7716,7 @@ This member is an explicit interface member implementation. It can be used only
## Remarks
The return value is the integral part of the decimal value; fractional digits are truncated.
- You can also convert a value to an 64-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in Visual Basic.
+ You can also convert a value to an 64-bit unsigned integer by using the assignment operator. Because the operator performs a narrowing conversion, you must use a casting operator in C# or a conversion function in F# or Visual Basic.
@@ -7629,6 +7724,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert decimal numbers to values.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.decimal.touint64/cs/touint64_1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.touint64/vb/touint64_1.vb" id="Snippet1":::
]]>
@@ -7699,6 +7795,7 @@ This member is an explicit interface member implementation. It can be used only
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CPP/floor_neg_trunc.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CS/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/VB/floor_neg_trunc.vb" id="Snippet1":::
]]>
@@ -7933,6 +8030,7 @@ This member is an explicit interface member implementation. It can be used only
The following example uses the method to convert the string representations of numeric values to values. It assumes that en-US is the current culture.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs" interactive="try-dotnet-method" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb" id="Snippet1":::
]]>
@@ -8079,6 +8177,7 @@ This member is an explicit interface member implementation. It can be used only
The following example demonstrates the use of the method to parse the string representation of a number that has a particular style and is formatted using the conventions of a particular culture.
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.TryParse/cs/TryParse.cs" interactive="try-dotnet-method" id="Snippet2":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs" id="Snippet2":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.TryParse/vb/TryParse.vb" id="Snippet2":::
]]>
@@ -8139,6 +8238,7 @@ This member is an explicit interface member implementation. It can be used only
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Fields/CS/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
From 3cd5a9d6c150d62e20f6bdb46f3a0b90dcef615f Mon Sep 17 00:00:00 2001
From: albert-du <52804499+albert-du@users.noreply.github.com>
Date: Tue, 18 Jan 2022 17:08:54 -0800
Subject: [PATCH 2/5] fix build
---
.../system.Decimal.Ctor.Reals/FS/ctordo.fs | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
index 5a3f4f5534d..21198c3a297 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs
@@ -1,4 +1,6 @@
-//
+module ctordo
+
+//
// Example of the decimal( double ) constructor.
open System
From 2fe31d2797ac2e83c52b365661d7ad3d6c1ef4ee Mon Sep 17 00:00:00 2001
From: albert-du <52804499+albert-du@users.noreply.github.com>
Date: Tue, 18 Jan 2022 17:22:21 -0800
Subject: [PATCH 3/5] Update ctors.fs
---
.../system.Decimal.Ctor.Reals/FS/ctors.fs | 71 ++++++++-----------
1 file changed, 31 insertions(+), 40 deletions(-)
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
index b4a212a5b6a..9f4a5874c43 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
+++ b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs
@@ -24,44 +24,35 @@ let createDecimal (value: float32) valToStr =
// Display the exception type if an exception was thrown.
printfn $"{getExceptionType ex,31}"
- public static void Main( )
- {
- Console.WriteLine( "This example of the decimal( float ) " +
- "constructor \ngenerates the following output.\n" );
- Console.WriteLine( "{0,-27}{1,31}", "Constructor",
- "Value or Exception" );
- Console.WriteLine( "{0,-27}{1,31}", "-----------",
- "------------------" );
-
- // Construct decimal objects from float values.
- CreateDecimal( 1.2345E+5F, "1.2345E+5F" );
- CreateDecimal( 1.234567E+15F, "1.234567E+15F" );
- CreateDecimal( 1.23456789E+25F, "1.23456789E+25F" );
- CreateDecimal( 1.23456789E+35F, "1.23456789E+35F" );
- CreateDecimal( 1.2345E-5F, "1.2345E-5F" );
- CreateDecimal( 1.234567E-15F, "1.234567E-15F" );
- CreateDecimal( 1.23456789E-25F, "1.23456789E-25F" );
- CreateDecimal( 1.23456789E-35F, "1.23456789E-35F" );
- CreateDecimal( 1.0F / 7.0F, "1.0F / 7.0F" );
- }
-}
-
-/*
-This example of the decimal( float ) constructor
-generates the following output.
-
-Constructor Value or Exception
------------ ------------------
-decimal( 1.2345E+5F ) 123450
-decimal( 1.234567E+15F ) 1234567000000000
-decimal( 1.23456789E+25F ) 12345680000000000000000000
-decimal( 1.23456789E+35F ) OverflowException
-decimal( 1.2345E-5F ) 0.000012345
-decimal( 1.234567E-15F ) 0.000000000000001234567
-decimal( 1.23456789E-25F ) 0.0000000000000000000000001235
-decimal( 1.23456789E-35F ) 0
-decimal( 1.0F / 7.0F ) 0.1428571
-*/
-//
-// Copied from /samples/snippets/csharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CS/ctors.cs
\ No newline at end of file
+printfn "This example of the decimal( float ) constructor \ngenerates the following output.\n"
+printfn $"""{"Constructor",-27}{"Value or Exception",31}"""
+printfn $"""{"-----------",-27}{"------------------",31}"""
+
+// Construct decimal objects from float values.
+createDecimal 1.2345E+5f "1.2345E+5F"
+createDecimal 1.234567E+15f "1.234567E+15F"
+createDecimal 1.23456789E+25f "1.23456789E+25F"
+createDecimal 1.23456789E+35f "1.23456789E+35F"
+createDecimal 1.2345E-5f "1.2345E-5F"
+createDecimal 1.234567E-15f "1.234567E-15F"
+createDecimal 1.23456789E-25f "1.23456789E-25F"
+createDecimal 1.23456789E-35f "1.23456789E-35F"
+createDecimal (1f / 7f) "1.0F / 7.0F"
+
+
+// This example of the decimal( float ) constructor
+// generates the following output.
+
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( 1.2345E+5F ) 123450
+// decimal( 1.234567E+15F ) 1234567000000000
+// decimal( 1.23456789E+25F ) 12345680000000000000000000
+// decimal( 1.23456789E+35F ) OverflowException
+// decimal( 1.2345E-5F ) 0.000012345
+// decimal( 1.234567E-15F ) 0.000000000000001234567
+// decimal( 1.23456789E-25F ) 0.0000000000000000000000001235
+// decimal( 1.23456789E-35F ) 0
+// decimal( 1.0F / 7.0F ) 0.1428571
+//
\ No newline at end of file
From 301e336958ca6e19575c5142deae7485cbb0d8ae Mon Sep 17 00:00:00 2001
From: albert-du <52804499+albert-du@users.noreply.github.com>
Date: Fri, 28 Jan 2022 20:27:11 -0800
Subject: [PATCH 4/5] Move snippets
---
.../Decimal Example/FS/fs.fsproj | 9 -
.../FS/fs.fsproj | 11 -
.../FS/fs.fsproj | 12 -
.../system.Decimal.Ctor.Arrays/FS/fs.fsproj | 10 -
.../system.Decimal.Ctor.Reals/FS/fs.fsproj | 10 -
.../system.decimal.ctor/fs/fs.fsproj | 9 -
.../fs/fs.fsproj | 10 -
.../system.math.round.overload/fs/fs.fsproj | 10 -
.../fsharp/System/Decimal/.ctor}/ctor2a.fs | 6 +-
.../fsharp/System/Decimal/.ctor/ctordo.fs | 56 ++
.../fsharp/System/Decimal/.ctor}/ctori.fs | 4 +-
.../fsharp/System/Decimal/.ctor}/ctoriarr.fs | 4 +-
.../System/Decimal/.ctor}/ctoriiibby.fs | 6 +-
.../fsharp/System/Decimal/.ctor}/ctorl.fs | 4 +-
snippets/fsharp/System/Decimal/.ctor/ctors.fs | 58 ++
.../fsharp/System/Decimal/.ctor}/ctorui.fs | 4 +-
.../fsharp/System/Decimal/.ctor}/ctorul.fs | 4 +-
.../fsharp/System/Decimal/.ctor}/fs.fsproj | 5 +
.../System/Decimal/Ceiling}/ceiling1.fs | 4 +-
.../fsharp/System/Decimal/Ceiling}/fs.fsproj | 0
.../System/Decimal/Compare}/Compare1.fs | 4 +-
.../fsharp/System/Decimal/Compare}/fs.fsproj | 0
.../System/Decimal/CompareTo}/comp_equal.fs | 4 +-
.../System/Decimal/CompareTo}/cto_eq_obj.fs | 4 +-
.../System/Decimal/CompareTo}/fs.fsproj | 0
.../fsharp/System/Decimal/Divide}/Divide1.fs | 4 +-
.../fsharp/System/Decimal/Divide}/fs.fsproj | 0
.../System/Decimal/Equals}/equalsoverl.fs | 4 +-
.../fsharp/System/Decimal/Equals}/fs.fsproj | 0
.../Decimal/FromOACurrency}/fromoacurrency.fs | 4 +-
.../System/Decimal/FromOACurrency}/fs.fsproj | 0
.../Decimal/FromOACurrency}/tooacurrency.fs | 4 +-
.../fsharp/System/Decimal/GetBits}/fs.fsproj | 0
.../fsharp/System/Decimal/GetBits}/getbits.fs | 4 +-
.../System/Decimal/GetBits}/gettypecode.fs | 4 +-
.../fsharp/System/Decimal/MinusOne}/fields.fs | 4 +-
.../fsharp/System/Decimal/MinusOne}/fs.fsproj | 0
.../fsharp/System/Decimal/Multiply}/fs.fsproj | 0
.../System/Decimal/Multiply}/mul_div_rem.fs | 4 +-
.../System/Decimal/Negate}/floor_neg_trunc.fs | 4 +-
.../fsharp/System/Decimal/Negate}/fs.fsproj | 0
.../Overview}/DecimalDivision_46630_1.fs | 6 +-
.../fsharp/System/Decimal/Overview}/fs.fsproj | 1 +
.../fsharp/System/Decimal/Overview}/source.fs | 10 +-
.../fsharp/System/Decimal/Parse}/fs.fsproj | 2 +-
.../fsharp/System/Decimal/Parse}/parse.fs | 4 +-
.../System/Decimal/Remainder}/fs.fsproj | 0
.../System/Decimal/Remainder}/remainder.fs | 4 +-
.../fsharp/System/Decimal/Round}/Round1.fs | 4 +-
.../fsharp/System/Decimal/Round}/Round12.fs | 4 +-
.../fsharp/System/Decimal/Round}/fs.fsproj | 2 +
.../fsharp/System/Decimal/Round}/midpoint1.fs | 4 +-
.../fsharp/System/Decimal/Round}/mpr.fs | 4 +-
.../fsharp/System/Decimal/ToByte}/fs.fsproj | 0
.../fsharp/System/Decimal/ToByte}/tobyte_1.fs | 4 +-
.../fsharp/System/Decimal/ToDouble}/fs.fsproj | 0
.../System/Decimal/ToDouble}/tosgl_dbl.fs | 4 +-
.../fsharp/System/Decimal/ToInt16}/fs.fsproj | 0
.../System/Decimal/ToInt16}/toint16_1.fs | 4 +-
.../fsharp/System/Decimal/ToInt32}/fs.fsproj | 0
.../System/Decimal/ToInt32}/toint32_1.fs | 4 +-
.../fsharp/System/Decimal/ToInt64}/fs.fsproj | 0
.../System/Decimal/ToInt64}/toint64_1.fs | 4 +-
.../fsharp/System/Decimal/ToSByte}/fs.fsproj | 0
.../System/Decimal/ToSByte}/tosbyte1.fs | 4 +-
.../System/Decimal/ToString}/ToString2.fs | 6 +-
.../fsharp/System/Decimal/ToString}/fs.fsproj | 0
.../fsharp/System/Decimal/ToUInt16}/fs.fsproj | 0
.../System/Decimal/ToUInt16}/touint16_1.fs | 4 +-
.../fsharp/System/Decimal/ToUInt32}/fs.fsproj | 0
.../System/Decimal/ToUInt32}/touint32_1.fs | 4 +-
.../fsharp/System/Decimal/ToUInt64}/fs.fsproj | 0
.../System/Decimal/ToUInt64}/touint64_1.fs | 4 +-
.../System/Decimal/TryParse}/TryParse.fs | 4 +-
.../fsharp/System/Decimal/TryParse}/fs.fsproj | 0
.../System/Decimal/op_Addition}/addition1.fs | 4 +-
.../System/Decimal/op_Addition}/decrement1.fs | 4 +-
.../System/Decimal/op_Addition}/decrement2.fs | 4 +-
.../System/Decimal/op_Addition}/division1.fs | 4 +-
.../System/Decimal/op_Addition}/equality1.fs | 4 +-
.../System/Decimal/op_Addition}/fs.fsproj | 2 +-
.../Decimal/op_Addition}/greaterthan1.fs | 4 +-
.../op_Addition}/greaterthanorequal1.fs | 4 +-
.../System/Decimal/op_Addition}/increment1.fs | 4 +-
.../System/Decimal/op_Addition}/increment2.fs | 4 +-
.../Decimal/op_Addition}/inequality1.fs | 4 +-
.../System/Decimal/op_Addition}/lessthan1.fs | 4 +-
.../Decimal/op_Addition}/lessthanorequal1.fs | 4 +-
.../System/Decimal/op_Addition}/modulus1.fs | 4 +-
.../System/Decimal/op_Addition}/multiply1.fs | 4 +-
.../Decimal/op_Addition}/subtraction1.fs | 4 +-
.../System/Decimal/op_Explicit}/cfromchar.fs | 4 +-
.../Decimal/op_Explicit}/cfromdouble.fs | 4 +-
.../Decimal/op_Explicit}/cfromsingle.fs | 6 +-
.../System/Decimal/op_Explicit}/ctochar.fs | 4 +-
.../System/Decimal/op_Explicit}/ctos_byte.fs | 4 +-
.../System/Decimal/op_Explicit}/ctosgl_dbl.fs | 4 +-
.../System/Decimal/op_Explicit}/ctou_int16.fs | 4 +-
.../System/Decimal/op_Explicit}/ctou_int32.fs | 4 +-
.../System/Decimal/op_Explicit}/ctou_int64.fs | 4 +-
.../System/Decimal/op_Explicit}/fs.fsproj | 7 +-
.../System/Decimal/op_Explicit}/tosbyte.fs | 4 +-
.../System/Decimal/op_Explicit}/tosingle1.fs | 4 +-
.../System/Decimal/op_Implicit}/cfrombyte.fs | 4 +-
.../System/Decimal/op_Implicit}/cfromint16.fs | 4 +-
.../System/Decimal/op_Implicit}/cfromint32.fs | 4 +-
.../System/Decimal/op_Implicit}/cfromint64.fs | 6 +-
.../System/Decimal/op_Implicit}/cfromsbyte.fs | 4 +-
.../Decimal/op_Implicit}/cfromuint16.fs | 4 +-
.../Decimal/op_Implicit}/cfromuint32.fs | 4 +-
.../Decimal/op_Implicit}/cfromuint64.fs | 4 +-
.../System/Decimal/op_Implicit}/fs.fsproj | 4 +
xml/System/Decimal.xml | 754 +++++++++---------
113 files changed, 666 insertions(+), 616 deletions(-)
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
delete mode 100644 samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs => snippets/fsharp/System/Decimal/.ctor}/ctor2a.fs (90%)
create mode 100644 snippets/fsharp/System/Decimal/.ctor/ctordo.fs
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS => snippets/fsharp/System/Decimal/.ctor}/ctori.fs (97%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS => snippets/fsharp/System/Decimal/.ctor}/ctoriarr.fs (99%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS => snippets/fsharp/System/Decimal/.ctor}/ctoriiibby.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS => snippets/fsharp/System/Decimal/.ctor}/ctorl.fs (98%)
create mode 100644 snippets/fsharp/System/Decimal/.ctor/ctors.fs
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS => snippets/fsharp/System/Decimal/.ctor}/ctorui.fs (97%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS => snippets/fsharp/System/Decimal/.ctor}/ctorul.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS => snippets/fsharp/System/Decimal/.ctor}/fs.fsproj (64%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs => snippets/fsharp/System/Decimal/Ceiling}/ceiling1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs => snippets/fsharp/System/Decimal/Ceiling}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs => snippets/fsharp/System/Decimal/Compare}/Compare1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs => snippets/fsharp/System/Decimal/Compare}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS => snippets/fsharp/System/Decimal/CompareTo}/comp_equal.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS => snippets/fsharp/System/Decimal/CompareTo}/cto_eq_obj.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS => snippets/fsharp/System/Decimal/CompareTo}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs => snippets/fsharp/System/Decimal/Divide}/Divide1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs => snippets/fsharp/System/Decimal/Divide}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs => snippets/fsharp/System/Decimal/Equals}/equalsoverl.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs => snippets/fsharp/System/Decimal/Equals}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS => snippets/fsharp/System/Decimal/FromOACurrency}/fromoacurrency.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS => snippets/fsharp/System/Decimal/FromOACurrency}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS => snippets/fsharp/System/Decimal/FromOACurrency}/tooacurrency.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS => snippets/fsharp/System/Decimal/GetBits}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS => snippets/fsharp/System/Decimal/GetBits}/getbits.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS => snippets/fsharp/System/Decimal/GetBits}/gettypecode.fs (93%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS => snippets/fsharp/System/Decimal/MinusOne}/fields.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS => snippets/fsharp/System/Decimal/MinusOne}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS => snippets/fsharp/System/Decimal/Multiply}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS => snippets/fsharp/System/Decimal/Multiply}/mul_div_rem.fs (99%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS => snippets/fsharp/System/Decimal/Negate}/floor_neg_trunc.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS => snippets/fsharp/System/Decimal/Negate}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs => snippets/fsharp/System/Decimal/Overview}/DecimalDivision_46630_1.fs (88%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs => snippets/fsharp/System/Decimal/Overview}/fs.fsproj (87%)
rename {samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS => snippets/fsharp/System/Decimal/Overview}/source.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS => snippets/fsharp/System/Decimal/Parse}/fs.fsproj (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS => snippets/fsharp/System/Decimal/Parse}/parse.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs => snippets/fsharp/System/Decimal/Remainder}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs => snippets/fsharp/System/Decimal/Remainder}/remainder.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs => snippets/fsharp/System/Decimal/Round}/Round1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs => snippets/fsharp/System/Decimal/Round}/Round12.fs (97%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs => snippets/fsharp/System/Decimal/Round}/fs.fsproj (78%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs => snippets/fsharp/System/Decimal/Round}/midpoint1.fs (97%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs => snippets/fsharp/System/Decimal/Round}/mpr.fs (99%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs => snippets/fsharp/System/Decimal/ToByte}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs => snippets/fsharp/System/Decimal/ToByte}/tobyte_1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS => snippets/fsharp/System/Decimal/ToDouble}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS => snippets/fsharp/System/Decimal/ToDouble}/tosgl_dbl.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs => snippets/fsharp/System/Decimal/ToInt16}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs => snippets/fsharp/System/Decimal/ToInt16}/toint16_1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs => snippets/fsharp/System/Decimal/ToInt32}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs => snippets/fsharp/System/Decimal/ToInt32}/toint32_1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs => snippets/fsharp/System/Decimal/ToInt64}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs => snippets/fsharp/System/Decimal/ToInt64}/toint64_1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs => snippets/fsharp/System/Decimal/ToSByte}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs => snippets/fsharp/System/Decimal/ToSByte}/tosbyte1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS => snippets/fsharp/System/Decimal/ToString}/ToString2.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS => snippets/fsharp/System/Decimal/ToString}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs => snippets/fsharp/System/Decimal/ToUInt16}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs => snippets/fsharp/System/Decimal/ToUInt16}/touint16_1.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs => snippets/fsharp/System/Decimal/ToUInt32}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs => snippets/fsharp/System/Decimal/ToUInt32}/touint32_1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs => snippets/fsharp/System/Decimal/ToUInt64}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs => snippets/fsharp/System/Decimal/ToUInt64}/touint64_1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs => snippets/fsharp/System/Decimal/TryParse}/TryParse.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs => snippets/fsharp/System/Decimal/TryParse}/fs.fsproj (100%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/addition1.fs (86%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/decrement1.fs (87%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/decrement2.fs (88%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/division1.fs (86%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/equality1.fs (92%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/fs.fsproj (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/greaterthan1.fs (91%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/greaterthanorequal1.fs (89%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/increment1.fs (88%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/increment2.fs (88%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/inequality1.fs (91%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/lessthan1.fs (91%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/lessthanorequal1.fs (90%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/modulus1.fs (86%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/multiply1.fs (86%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs => snippets/fsharp/System/Decimal/op_Addition}/subtraction1.fs (85%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS => snippets/fsharp/System/Decimal/op_Explicit}/cfromchar.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS => snippets/fsharp/System/Decimal/op_Explicit}/cfromdouble.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS => snippets/fsharp/System/Decimal/op_Explicit}/cfromsingle.fs (97%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctochar.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctos_byte.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctosgl_dbl.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctou_int16.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctou_int32.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/ctou_int64.fs (98%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS => snippets/fsharp/System/Decimal/op_Explicit}/fs.fsproj (68%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs => snippets/fsharp/System/Decimal/op_Explicit}/tosbyte.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs => snippets/fsharp/System/Decimal/op_Explicit}/tosingle1.fs (96%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfrombyte.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromint16.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromint32.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromint64.fs (93%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromsbyte.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromuint16.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromuint32.fs (94%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/cfromuint64.fs (95%)
rename {samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS => snippets/fsharp/System/Decimal/op_Implicit}/fs.fsproj (68%)
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
deleted file mode 100644
index 2bd5e7e8d50..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/fs.fsproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- Library
- net6.0
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
deleted file mode 100644
index 96cadbddfaa..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/fs.fsproj
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
deleted file mode 100644
index 3ff0cabf480..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/fs.fsproj
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
deleted file mode 100644
index b53d977164f..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/fs.fsproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
deleted file mode 100644
index 44cc7ad9274..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/fs.fsproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
deleted file mode 100644
index 84395e0bcc5..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/fs.fsproj
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
deleted file mode 100644
index c48e29749ad..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/fs.fsproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj b/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
deleted file mode 100644
index 367dd5bca98..00000000000
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/fs.fsproj
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- Exe
- net6.0
-
-
-
-
-
-
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs b/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs
similarity index 90%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctor2a.fs
index 25b385133a7..fcc252920be 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs
@@ -1,4 +1,6 @@
-//
+module ctor2a
+
+//
open System
let values = [ 1234.96m; -1234.96m ]
@@ -13,4 +15,4 @@ for value in values do
// The example displays the following output:
// 1234.96 --> 1234.96
// -1234.96 --> -1234.96
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Decimal/.ctor/ctordo.fs b/snippets/fsharp/System/Decimal/.ctor/ctordo.fs
new file mode 100644
index 00000000000..1af8d5efbb9
--- /dev/null
+++ b/snippets/fsharp/System/Decimal/.ctor/ctordo.fs
@@ -0,0 +1,56 @@
+module ctordo
+
+//
+// Example of the decimal( double ) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal (value: double) valToStr =
+ // Format and display the constructor.
+ printf "%-34s" $"decimal( {valToStr} )"
+
+ try
+ // Construct the decimal value.
+ let decimalNum = Decimal value
+
+ // Display the value if it was created successfully.
+ printfn $"{decimalNum,31}"
+ with ex ->
+ // Display the exception type if an exception was thrown.
+ printfn $"{getExceptionType ex,31}"
+
+printfn $"This example of the decimal( double ) constructor \ngenerates the following output.\n"
+printfn "%-34s%31s" "Constructor" "Value or Exception"
+printfn "%-34s%31s" "-----------" "------------------"
+
+// Construct decimal objects from double values.
+createDecimal 1.23456789E+5 "1.23456789E+5"
+createDecimal 1.234567890123E+15 "1.234567890123E+15"
+createDecimal 1.2345678901234567E+25 "1.2345678901234567E+25"
+createDecimal 1.2345678901234567E+35 "1.2345678901234567E+35"
+createDecimal 1.23456789E-5 "1.23456789E-5"
+createDecimal 1.234567890123E-15 "1.234567890123E-15"
+createDecimal 1.2345678901234567E-25 "1.2345678901234567E-25"
+createDecimal 1.2345678901234567E-35 "1.2345678901234567E-35"
+createDecimal (1. / 7.) "1. / 7."
+
+
+// This example of the decimal( double ) constructor
+// generates the following output.
+//
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( 1.23456789E+5 ) 123456.789
+// decimal( 1.234567890123E+15 ) 1234567890123000
+// decimal( 1.2345678901234567E+25 ) 12345678901234600000000000
+// decimal( 1.2345678901234567E+35 ) OverflowException
+// decimal( 1.23456789E-5 ) 0.0000123456789
+// decimal( 1.234567890123E-15 ) 0.000000000000001234567890123
+// decimal( 1.2345678901234567E-25 ) 0.0000000000000000000000001235
+// decimal( 1.2345678901234567E-35 ) 0
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs b/snippets/fsharp/System/Decimal/.ctor/ctori.fs
similarity index 97%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctori.fs
index a461cbb8fd0..fd7e4730d2e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctori.fs
@@ -1,4 +1,4 @@
-module ctori
+module ctori
//
// Example of the decimal(int) constructor.
@@ -38,4 +38,4 @@ createDecimal (int 0xC0000000) "int 0xC0000000"
// decimal( 999999999 ) 999999999
// decimal( 0x40000000 ) 1073741824
// decimal( int 0xC0000000 ) -1073741824
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs b/snippets/fsharp/System/Decimal/.ctor/ctoriarr.fs
similarity index 99%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctoriarr.fs
index 20a0bf0ea09..61ec47256a2 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctoriarr.fs
@@ -1,4 +1,4 @@
-module ctoriarr
+module ctoriarr
//
// Example of the decimal(int[]) constructor.
@@ -87,4 +87,4 @@ createDecimal [| 0xF0000; 0xF0000; 0xF0000; 0xF0000 |]
// decimal( { 0xFFFFFFFF, 0x0, 0x0, 0x1C0001 } ) ArgumentException
// decimal( { 0xF0000, 0xF0000, 0xF0000, 0xF0000 } )
// 18133887298.441562272235520
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs b/snippets/fsharp/System/Decimal/.ctor/ctoriiibby.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctoriiibby.fs
index 7d8fa8f92ea..664c84bc547 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctoriiibby.fs
@@ -1,4 +1,4 @@
-module ctoriiibby
+module ctoriiibby
//
// Example of the decimal( int, int, int, bool, byte ) constructor.
@@ -14,7 +14,7 @@ let createDecimal low mid high (isNeg: bool) (scale: byte) =
// Format the constructor for display.
let ctor =
$"decimal( %i{low}, %i{mid}, %i{high}, {isNeg}, {scale} )"
-
+
let valOrExc =
try
// Construct the decimal value.
@@ -84,4 +84,4 @@ createDecimal Int32.MaxValue 0 0 true 28uy
// decimal( 2147483647, 0, 0, False, 18 ) 0.000000002147483647
// decimal( 2147483647, 0, 0, False, 28 ) 0.0000000000000000002147483647
// decimal( 2147483647, 0, 0, True, 28 ) -0.0000000000000000002147483647
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs b/snippets/fsharp/System/Decimal/.ctor/ctorl.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctorl.fs
index e27c5b22a66..d61a03974ef 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctorl.fs
@@ -1,4 +1,4 @@
-module ctorl
+module ctorl
//
// Example of the decimal( int64 ) constructor.
@@ -37,4 +37,4 @@ createDecimal (int64 0xE000000000000000L) "int64 0xE000000000000000L"
// decimal( 999999999999999999L ) 999999999999999999
// decimal( 0x2000000000000000L ) 2305843009213693952
// decimal( int64 0xE000000000000000L ) -2305843009213693952
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/snippets/fsharp/System/Decimal/.ctor/ctors.fs b/snippets/fsharp/System/Decimal/.ctor/ctors.fs
new file mode 100644
index 00000000000..be8cf441754
--- /dev/null
+++ b/snippets/fsharp/System/Decimal/.ctor/ctors.fs
@@ -0,0 +1,58 @@
+module ctors
+
+//
+// Example of the decimal( float ) constructor.
+open System
+
+// Get the exception type name; remove the namespace prefix.
+let getExceptionType (ex: exn) =
+ let exceptionType = ex.GetType() |> string
+ exceptionType.Substring(exceptionType.LastIndexOf '.' + 1)
+
+// Create a decimal object and display its value.
+let createDecimal (value: float32) valToStr =
+ // Format and display the constructor.
+ printf "%-27s" $"decimal( {valToStr} )"
+
+ try
+ // Construct the decimal value.
+ let decimalNum = Decimal value
+
+ // Display the value if it was created successfully.
+ printfn $"{decimalNum,31}"
+ with ex ->
+ // Display the exception type if an exception was thrown.
+ printfn $"{getExceptionType ex,31}"
+
+
+printfn "This example of the decimal( float ) constructor \ngenerates the following output.\n"
+printfn $"""{"Constructor",-27}{"Value or Exception",31}"""
+printfn $"""{"-----------",-27}{"------------------",31}"""
+
+// Construct decimal objects from float values.
+createDecimal 1.2345E+5f "1.2345E+5F"
+createDecimal 1.234567E+15f "1.234567E+15F"
+createDecimal 1.23456789E+25f "1.23456789E+25F"
+createDecimal 1.23456789E+35f "1.23456789E+35F"
+createDecimal 1.2345E-5f "1.2345E-5F"
+createDecimal 1.234567E-15f "1.234567E-15F"
+createDecimal 1.23456789E-25f "1.23456789E-25F"
+createDecimal 1.23456789E-35f "1.23456789E-35F"
+createDecimal (1f / 7f) "1.0F / 7.0F"
+
+
+// This example of the decimal( float ) constructor
+// generates the following output.
+
+// Constructor Value or Exception
+// ----------- ------------------
+// decimal( 1.2345E+5F ) 123450
+// decimal( 1.234567E+15F ) 1234567000000000
+// decimal( 1.23456789E+25F ) 12345680000000000000000000
+// decimal( 1.23456789E+35F ) OverflowException
+// decimal( 1.2345E-5F ) 0.000012345
+// decimal( 1.234567E-15F ) 0.000000000000001234567
+// decimal( 1.23456789E-25F ) 0.0000000000000000000000001235
+// decimal( 1.23456789E-35F ) 0
+// decimal( 1.0F / 7.0F ) 0.1428571
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs b/snippets/fsharp/System/Decimal/.ctor/ctorui.fs
similarity index 97%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctorui.fs
index a9704b91cf9..1aa5ea0a09f 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctorui.fs
@@ -1,4 +1,4 @@
-module ctorui
+module ctorui
//
// Example of the decimal( uint ) constructor.
@@ -38,4 +38,4 @@ createDecimal 0xC0000000u "0xC0000000u"
// decimal( 999999999u ) 999999999
// decimal( 0x40000000u ) 1073741824
// decimal( 0xC0000000u ) 3221225472
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs b/snippets/fsharp/System/Decimal/.ctor/ctorul.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs
rename to snippets/fsharp/System/Decimal/.ctor/ctorul.fs
index faa0a09ef1c..5e712f55496 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs
+++ b/snippets/fsharp/System/Decimal/.ctor/ctorul.fs
@@ -1,4 +1,4 @@
-module ctorul
+module ctorul
//
// Example of the decimal( uint64 ) constructor.
@@ -38,4 +38,4 @@ createDecimal 0xE000000000000000uL "0xE000000000000000uL"
// decimal( 999999999999999999uL ) 999999999999999999
// decimal( 0x2000000000000000uL ) 2305843009213693952
// decimal( 0xE000000000000000uL ) 16140901064495857664
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj b/snippets/fsharp/System/Decimal/.ctor/fs.fsproj
similarity index 64%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/.ctor/fs.fsproj
index b3fdced9981..453d258c483 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/.ctor/fs.fsproj
@@ -4,9 +4,14 @@
net6.0
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs b/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs
rename to snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs
index 6efa166d7ec..5bcd53bae21 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs
+++ b/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -21,4 +21,4 @@ for value in values do
// -1.1 -1 -2
// -1.9 -1 -2
// -3.9 -3 -4
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Ceiling/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Ceiling/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs b/snippets/fsharp/System/Decimal/Compare/Compare1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs
rename to snippets/fsharp/System/Decimal/Compare/Compare1.fs
index 413a3a01afd..14cdcc11c18 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs
+++ b/snippets/fsharp/System/Decimal/Compare/Compare1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
type Relationship =
@@ -26,4 +26,4 @@ let main _ =
// 79228162514264337593543950335 Equals 79228162514264337593543950335
// 6602346876188694799461995861.2 GreaterThan 6602346876188694799461995861.1
// 6602346876188694799461995861.0 LessThan 6602346876188694799461995861.2
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Compare/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Compare/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs b/snippets/fsharp/System/Decimal/CompareTo/comp_equal.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs
rename to snippets/fsharp/System/Decimal/CompareTo/comp_equal.fs
index 9be4ebdc39a..f3957678347 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs
+++ b/snippets/fsharp/System/Decimal/CompareTo/comp_equal.fs
@@ -1,4 +1,4 @@
-module comp_equal
+module comp_equal
//
// Example of the decimal.Compare and static decimal.Equals methods.
@@ -59,4 +59,4 @@ compareDecimals left (Decimal(123456000, 0, 0, false, 6uy)) "Decimal(123456000,
// right: decimal(123456000, 0, 0, false, 6) 123.456000
// decimal.Equals(left, right) True
// decimal.Compare(left, right) 0
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs b/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs
rename to snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs
index 96f76da833e..067f6cced9a 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs
+++ b/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs
@@ -1,4 +1,4 @@
-module cto_eq_obj
+module cto_eq_obj
//
// Example of the decimal.CompareTo and decimal.Equals instance
@@ -73,4 +73,4 @@ compDecimalToObject left "987.654" "String \"987.654\""
// object: String "987.654" 987.654
// left.Equals(object) False
// left.CompareTo(object) ArgumentException
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj b/snippets/fsharp/System/Decimal/CompareTo/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/CompareTo/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs b/snippets/fsharp/System/Decimal/Divide/Divide1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs
rename to snippets/fsharp/System/Decimal/Divide/Divide1.fs
index ee9c63e1a72..ceab2a53465 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs
+++ b/snippets/fsharp/System/Decimal/Divide/Divide1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
// Divide a series of numbers by 22.1
@@ -19,4 +19,4 @@ for i = 0 to 10 do
// 1,230.8 / 22.1 = 55.6923
// 1,230.9 / 22.1 = 55.6968
// 1,231.0 / 22.1 = 55.7014
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Divide/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Divide/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs b/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs
rename to snippets/fsharp/System/Decimal/Equals/equalsoverl.fs
index 3d8bf74fecf..dcb2ff947d2 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs
+++ b/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs
@@ -1,4 +1,4 @@
-//
+//
let value = 112m
let testObjectForEquality (obj: obj) =
@@ -75,4 +75,4 @@ testObjectForEquality dbl1
//
// value = dbl1: False
// 112 (Decimal) = 112 (Double): False
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Equals/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Equals/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs b/snippets/fsharp/System/Decimal/FromOACurrency/fromoacurrency.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs
rename to snippets/fsharp/System/Decimal/FromOACurrency/fromoacurrency.fs
index a66cf1abd71..ba8c1c80173 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs
+++ b/snippets/fsharp/System/Decimal/FromOACurrency/fromoacurrency.fs
@@ -1,4 +1,4 @@
-module fromoacurrency
+module fromoacurrency
//
// Example of the Decimal.FromOACurrency method.
@@ -53,4 +53,4 @@ showDecimalFromOACurrency 4294967295L
// 1234567890000 123456789
// 1234567890987654321 123456789098765.4321
// 4294967295 429496.7295
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj b/snippets/fsharp/System/Decimal/FromOACurrency/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/FromOACurrency/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs b/snippets/fsharp/System/Decimal/FromOACurrency/tooacurrency.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs
rename to snippets/fsharp/System/Decimal/FromOACurrency/tooacurrency.fs
index df2ac3d02ac..90a0778b67e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/tooacurrency.fs
+++ b/snippets/fsharp/System/Decimal/FromOACurrency/tooacurrency.fs
@@ -1,4 +1,4 @@
-module tooacurrency
+module tooacurrency
//
// Example of the Decimal.ToOACurrency method.
@@ -66,4 +66,4 @@ showDecimalToOACurrency -79228162514264.337593543950335M
// 18446744073709551615 OverflowException
// -79.228162514264337593543950335 -792282
// -79228162514264.337593543950335 -792281625142643376
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj b/snippets/fsharp/System/Decimal/GetBits/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/GetBits/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs b/snippets/fsharp/System/Decimal/GetBits/getbits.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs
rename to snippets/fsharp/System/Decimal/GetBits/getbits.fs
index 6f12b2da1d3..3528c0715fc 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs
+++ b/snippets/fsharp/System/Decimal/GetBits/getbits.fs
@@ -1,4 +1,4 @@
-module getbits
+module getbits
//
open System
@@ -38,4 +38,4 @@ for value in values do
// 79228162514264337593543950335 00000000 FFFFFFFF FFFFFFFF FFFFFFFF
// -79228162514264337593543950335 80000000 FFFFFFFF FFFFFFFF FFFFFFFF
// -7.9228162514264337593543950335 801C0000 FFFFFFFF FFFFFFFF FFFFFFFF
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs b/snippets/fsharp/System/Decimal/GetBits/gettypecode.fs
similarity index 93%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs
rename to snippets/fsharp/System/Decimal/GetBits/gettypecode.fs
index f64a5b374e7..c81f1bd4c7e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs
+++ b/snippets/fsharp/System/Decimal/GetBits/gettypecode.fs
@@ -1,4 +1,4 @@
-module gettypecode
+module gettypecode
//
// Example of the Decimal.GetTypeCode method.
@@ -19,4 +19,4 @@ printfn $"Numeric value: {int typCode}"
//
// Type Code: "Decimal"
// Numeric value: 15
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs b/snippets/fsharp/System/Decimal/MinusOne/fields.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs
rename to snippets/fsharp/System/Decimal/MinusOne/fields.fs
index b69d3ba8de9..cb23570eca2 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs
+++ b/snippets/fsharp/System/Decimal/MinusOne/fields.fs
@@ -1,4 +1,4 @@
-//
+//
// Example of the Decimal fields.
open System
@@ -39,4 +39,4 @@ printfn "%-40s%30O" "100000000000000M / Decimal.MaxValue" (100000000000000M / De
// Decimal.MaxValue + Decimal.MinValue 0
// Decimal.MinValue / Decimal.MaxValue -1
// 100000000000000M / Decimal.MaxValue 0.0000000000000012621774483536
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj b/snippets/fsharp/System/Decimal/MinusOne/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/MinusOne/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj b/snippets/fsharp/System/Decimal/Multiply/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/Multiply/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs b/snippets/fsharp/System/Decimal/Multiply/mul_div_rem.fs
similarity index 99%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs
rename to snippets/fsharp/System/Decimal/Multiply/mul_div_rem.fs
index e9beff72368..c17df084113 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs
+++ b/snippets/fsharp/System/Decimal/Multiply/mul_div_rem.fs
@@ -1,4 +1,4 @@
-//
+//
// Example of the Decimal.Multiply, Decimal.Divide, and
// Decimal.Remainder methods.
open System
@@ -68,4 +68,4 @@ showDecimalProQuoRem 123456789.0123456789M 123456789.1123456789M
// Decimal.Multiply( left, right ) 15241578765584515.651425087878
// Decimal.Divide( left, right ) 0.9999999991899999933660999449
// Decimal.Remainder( left, right ) 123456789.0123456789
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs b/snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs
rename to snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs
index c8ba5029dbd..4f6d530418d 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs
+++ b/snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs
@@ -1,4 +1,4 @@
-//
+//
// Example of the decimal.Negate, decimal.Floor, and decimal.Truncate
// methods.
open System
@@ -58,4 +58,4 @@ showDecimalFloorNegTrunc -9999999999.9999999999M
// Decimal.Negate( argument ) 9999999999.9999999999
// decimal.Floor( argument ) -10000000000
// decimal.Truncate( argument ) -9999999999
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj b/snippets/fsharp/System/Decimal/Negate/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/Negate/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs b/snippets/fsharp/System/Decimal/Overview/DecimalDivision_46630_1.fs
similarity index 88%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs
rename to snippets/fsharp/System/Decimal/Overview/DecimalDivision_46630_1.fs
index e14bf2589c2..8c95a3d5e51 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs
+++ b/snippets/fsharp/System/Decimal/Overview/DecimalDivision_46630_1.fs
@@ -1,4 +1,6 @@
-open System
+module DecimalDivision_46630_1
+
+open System
let divideWithoutRounding () =
//
@@ -17,4 +19,4 @@ let divideWithRounding () =
//
divideWithoutRounding ()
-divideWithRounding ()
\ No newline at end of file
+divideWithRounding ()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Overview/fs.fsproj
similarity index 87%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Overview/fs.fsproj
index f3bb7fa3822..ed7024dea75 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/Overview/fs.fsproj
@@ -5,5 +5,6 @@
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs b/snippets/fsharp/System/Decimal/Overview/source.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs
rename to snippets/fsharp/System/Decimal/Overview/source.fs
index 9a97ae8bee5..105f475288e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs
+++ b/snippets/fsharp/System/Decimal/Overview/source.fs
@@ -1,12 +1,10 @@
-module snippets
+module snippets
open System
module snippet1 =
//
- ///
/// Keeping my fortune in Decimals to avoid the round-off errors.
- ///
type PiggyBank() =
let mutable myFortune = 0m
@@ -42,7 +40,7 @@ module snippet3 =
//
type PiggyBank() =
let mutable myFortune = 0m
-
+
member _.Dollars =
Decimal.Floor myFortune
@@ -66,10 +64,10 @@ module snippet5 =
//
type PiggyBank() =
let mutable myFortune = 0m
-
+
member _.AddPenny() =
myFortune <- Decimal.Add(myFortune, 0.01m)
override _.ToString() =
$"{myFortune:C} in piggy bank"
- //
\ No newline at end of file
+ //
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj b/snippets/fsharp/System/Decimal/Parse/fs.fsproj
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/Parse/fs.fsproj
index 7aecbf41458..ef8721d8acf 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/Parse/fs.fsproj
@@ -6,4 +6,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs b/snippets/fsharp/System/Decimal/Parse/parse.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs
rename to snippets/fsharp/System/Decimal/Parse/parse.fs
index db6c15bf1ae..edba5511f75 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Parse/FS/parse.fs
+++ b/snippets/fsharp/System/Decimal/Parse/parse.fs
@@ -1,4 +1,4 @@
-open System
+open System
open System.Globalization
let callParse () =
@@ -124,4 +124,4 @@ callParse ()
printfn "-----"
callParseWithStyles ()
printfn "-----"
-callParseWithStylesAndProvider ()
\ No newline at end of file
+callParseWithStylesAndProvider ()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Remainder/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Remainder/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs b/snippets/fsharp/System/Decimal/Remainder/remainder.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs
rename to snippets/fsharp/System/Decimal/Remainder/remainder.fs
index 15f06d4f24b..0bddb33c9ad 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.remainder/fs/remainder.fs
+++ b/snippets/fsharp/System/Decimal/Remainder/remainder.fs
@@ -1,4 +1,4 @@
-//
+//
open System
// Create parallel lists of Decimals to use as the dividend and divisor.
@@ -19,4 +19,4 @@ for i = 0 to dividends.Length - 1 do
// 123.000 / 0.001 = 100,000.000 Remainder 0.000
// 1,234,567,800,000.000 / 0.123 = 10,000,000,000,000.000 Remainder 0.000
// 1,234.012 / 1,234.568 = 1.000 Remainder 1,234.012
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs b/snippets/fsharp/System/Decimal/Round/Round1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs
rename to snippets/fsharp/System/Decimal/Round/Round1.fs
index 61c8a6f580d..d1cf7b0fab3 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round1.fs
+++ b/snippets/fsharp/System/Decimal/Round/Round1.fs
@@ -1,4 +1,4 @@
-module Round1
+module Round1
//
open System
@@ -28,4 +28,4 @@ for value in 100m .. 0.1m .. 102m do
// 101.8 --> 102
// 101.9 --> 102
// 102.0 --> 102
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs b/snippets/fsharp/System/Decimal/Round/Round12.fs
similarity index 97%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs
rename to snippets/fsharp/System/Decimal/Round/Round12.fs
index 45c52a3645c..6da4810326c 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/Round12.fs
+++ b/snippets/fsharp/System/Decimal/Round/Round12.fs
@@ -1,4 +1,4 @@
-module Round12
+module Round12
//
open System
@@ -35,4 +35,4 @@ for i = 0 to values.Length - 1 do
// -123.0000000 11 -123.0000000
// -9999999999.9999999999 9 -10000000000.000000000
// -9999999999.9999999999 10 -9999999999.9999999999
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj b/snippets/fsharp/System/Decimal/Round/fs.fsproj
similarity index 78%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/Round/fs.fsproj
index f8f9ffebeee..d4c1c8498c3 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Round/fs/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/Round/fs.fsproj
@@ -6,5 +6,7 @@
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs b/snippets/fsharp/System/Decimal/Round/midpoint1.fs
similarity index 97%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs
rename to snippets/fsharp/System/Decimal/Round/midpoint1.fs
index 7ceb9105fd2..7c0237fe608 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/midpoint1.fs
+++ b/snippets/fsharp/System/Decimal/Round/midpoint1.fs
@@ -1,4 +1,4 @@
-module midpoint1
+module midpoint1
open System
@@ -25,4 +25,4 @@ for value in 12m .. 0.1m .. 13m do
// 12.8 13 13 13 12
// 12.9 13 13 13 12
// 13.0 13 13 13 13
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs b/snippets/fsharp/System/Decimal/Round/mpr.fs
similarity index 99%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs
rename to snippets/fsharp/System/Decimal/Round/mpr.fs
index 37f67811202..8099e6ba8d1 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.math.round.overload/fs/mpr.fs
+++ b/snippets/fsharp/System/Decimal/Round/mpr.fs
@@ -1,4 +1,4 @@
-module mpr
+module mpr
// This example demonstrates the Math.Round() method in conjunction
// with the MidpointRounding enumeration and decimal places.
@@ -75,4 +75,4 @@ let doubleExample () =
// -3.5 = Math.Round(-3.45, 1, MidpointRounding.AwayFromZero)
// -3.4 = Math.Round(-3.47, 1, MidpointRounding.ToZero)
- //
\ No newline at end of file
+ //
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToByte/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToByte/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs b/snippets/fsharp/System/Decimal/ToByte/tobyte_1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs
rename to snippets/fsharp/System/Decimal/ToByte/tobyte_1.fs
index 74cb2f2015c..ef30997c498 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tobyte/fs/tobyte_1.fs
+++ b/snippets/fsharp/System/Decimal/ToByte/tobyte_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -26,4 +26,4 @@ for value in values do
// OverflowException: -1
// OverflowException: -128.999
// OverflowException: -129
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj b/snippets/fsharp/System/Decimal/ToDouble/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToDouble/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs b/snippets/fsharp/System/Decimal/ToDouble/tosgl_dbl.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs
rename to snippets/fsharp/System/Decimal/ToDouble/tosgl_dbl.fs
index 069d729fa8a..1b3e705f09f 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToXXX/FS/tosgl_dbl.fs
+++ b/snippets/fsharp/System/Decimal/ToDouble/tosgl_dbl.fs
@@ -1,4 +1,4 @@
-//
+//
// Example of the Decimal.ToSingle and Decimal.ToDouble methods.
open System
@@ -52,4 +52,4 @@ decimalToSgl_Dbl Decimal.MaxValue
// 123456789123456789123456789 1.234568E+26 1.23456789123457E+26
// -79228162514264337593543950335 -7.922816E+28 -7.92281625142643E+28
// 79228162514264337593543950335 7.922816E+28 7.92281625142643E+28
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToInt16/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToInt16/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs b/snippets/fsharp/System/Decimal/ToInt16/toint16_1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs
rename to snippets/fsharp/System/Decimal/ToInt16/toint16_1.fs
index 6826511da6d..d2bbdba00ea 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint16/fs/toint16_1.fs
+++ b/snippets/fsharp/System/Decimal/ToInt16/toint16_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -26,4 +26,4 @@ for value in values do
// -1 --> -1
// -32768.999 --> -32768
// OverflowException: -32769
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToInt32/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToInt32/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs b/snippets/fsharp/System/Decimal/ToInt32/toint32_1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs
rename to snippets/fsharp/System/Decimal/ToInt32/toint32_1.fs
index a114b9dace7..ef1bc663b28 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint32/fs/toint32_1.fs
+++ b/snippets/fsharp/System/Decimal/ToInt32/toint32_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -27,4 +27,4 @@ for value in values do
// -1 --> -1
// -2147483648.999 --> -2147483648
// OverflowException: -2147483649
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToInt64/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToInt64/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs b/snippets/fsharp/System/Decimal/ToInt64/toint64_1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs
rename to snippets/fsharp/System/Decimal/ToInt64/toint64_1.fs
index 4a4d82ced63..c322a888514 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.toint64/fs/toint64_1.fs
+++ b/snippets/fsharp/System/Decimal/ToInt64/toint64_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -28,4 +28,4 @@ for value in values do
// -1 --> -1
// -9223372036854775808.999 --> -9223372036854775808
// OverflowException: -9223372036854775809
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToSByte/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToSByte/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs b/snippets/fsharp/System/Decimal/ToSByte/tosbyte1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs
rename to snippets/fsharp/System/Decimal/ToSByte/tosbyte1.fs
index 4aa2445e08d..ab1b07b10d5 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.tosbyte/fs/tosbyte1.fs
+++ b/snippets/fsharp/System/Decimal/ToSByte/tosbyte1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -26,4 +26,4 @@ for value in values do
// -1 --> -1
// -128.999 --> -128
// OverflowException: -129
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs b/snippets/fsharp/System/Decimal/ToString/ToString2.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs
rename to snippets/fsharp/System/Decimal/ToString/ToString2.fs
index 9678e599926..c3d7e841db1 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/ToString2.fs
+++ b/snippets/fsharp/System/Decimal/ToString/ToString2.fs
@@ -1,4 +1,4 @@
-open System
+open System
open System.Globalization
let callDefaultToString () =
@@ -102,7 +102,7 @@ let callWithSpecificSpecifiersAndCultures () =
// Displays: 16.325,62
let culture = CultureInfo.CreateSpecificCulture "fr-CA"
Console.WriteLine(value.ToString(specifier, culture))
- // Displays: 16 325,62
+ // Displays: 16 325,62
let specifier = "P"
let culture = CultureInfo.InvariantCulture
@@ -119,4 +119,4 @@ callToStringWithSpecificCultures()
printfn "-----"
callWithSpecificSpecifiers()
printfn "-----"
-callWithSpecificSpecifiersAndCultures()
\ No newline at end of file
+callWithSpecificSpecifiersAndCultures()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj b/snippets/fsharp/System/Decimal/ToString/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.ToString/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToString/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToUInt16/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToUInt16/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs b/snippets/fsharp/System/Decimal/ToUInt16/touint16_1.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs
rename to snippets/fsharp/System/Decimal/ToUInt16/touint16_1.fs
index da9ba97873f..a1bfc24eaad 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint16/fs/touint16_1.fs
+++ b/snippets/fsharp/System/Decimal/ToUInt16/touint16_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -26,4 +26,4 @@ for value in values do
// OverflowException: -1
// OverflowException: -32768.999
// OverflowException: -32769
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToUInt32/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToUInt32/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs b/snippets/fsharp/System/Decimal/ToUInt32/touint32_1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs
rename to snippets/fsharp/System/Decimal/ToUInt32/touint32_1.fs
index aea0b7c37b1..1e09f2b4cff 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint32/fs/touint32_1.fs
+++ b/snippets/fsharp/System/Decimal/ToUInt32/touint32_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -27,4 +27,4 @@ for value in values do
// OverflowException: -1
// OverflowException: -2147483648.999
// OverflowException: -2147483649
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj b/snippets/fsharp/System/Decimal/ToUInt64/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/ToUInt64/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs b/snippets/fsharp/System/Decimal/ToUInt64/touint64_1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs
rename to snippets/fsharp/System/Decimal/ToUInt64/touint64_1.fs
index b14ce9b09fc..d8ffce3f943 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.touint64/fs/touint64_1.fs
+++ b/snippets/fsharp/System/Decimal/ToUInt64/touint64_1.fs
@@ -1,4 +1,4 @@
-//
+//
open System
let values =
@@ -28,4 +28,4 @@ for value in values do
// OverflowException: -1
// OverflowException: -9223372036854775808.999
// OverflowException: -9223372036854775809
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs b/snippets/fsharp/System/Decimal/TryParse/TryParse.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs
rename to snippets/fsharp/System/Decimal/TryParse/TryParse.fs
index c7a426235ff..889150db44d 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/TryParse.fs
+++ b/snippets/fsharp/System/Decimal/TryParse/TryParse.fs
@@ -1,4 +1,4 @@
-open System
+open System
open System.Globalization
let callTryParse1 () =
@@ -90,4 +90,4 @@ let callTryParse2 () =
callTryParse1 ()
printfn "----------"
-callTryParse2 ()
+callTryParse2 ()
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj b/snippets/fsharp/System/Decimal/TryParse/fs.fsproj
similarity index 100%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.TryParse/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/TryParse/fs.fsproj
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs b/snippets/fsharp/System/Decimal/op_Addition/addition1.fs
similarity index 86%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/addition1.fs
index ee34f488246..531c3a1080b 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/addition1.fs
@@ -1,4 +1,4 @@
-module addition1
+module addition1
//
let number1 = 120.07m
@@ -8,4 +8,4 @@ printfn $"{number1} + {number2} = {number3}"
// The example displays the following output:
// 120.07 + 163.19 = 283.26
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs b/snippets/fsharp/System/Decimal/op_Addition/decrement1.fs
similarity index 87%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/decrement1.fs
index b5534dcb6a4..d65c459a257 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/decrement1.fs
@@ -1,4 +1,4 @@
-module decrement1
+module decrement1
//
let number = 1079.8m
@@ -8,4 +8,4 @@ printfn $"Decremented value: {- -number:N}"
// The example displays the following output:
// Original value: 1,079.80
// Decremented value: 1,078.80
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs b/snippets/fsharp/System/Decimal/op_Addition/decrement2.fs
similarity index 88%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs
rename to snippets/fsharp/System/Decimal/op_Addition/decrement2.fs
index 65f48149783..413de2c7bf9 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/decrement2.fs
@@ -1,4 +1,4 @@
-module decrement2
+module decrement2
//
open System
@@ -10,4 +10,4 @@ printfn $"Decremented value: {Decimal.Subtract(number, 1):N}"
// The example displays the following output:
// Original value: 1,079.80
// Decremented value: 1,078.80
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs b/snippets/fsharp/System/Decimal/op_Addition/division1.fs
similarity index 86%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/division1.fs
index e4dcf957491..aa0cbde8cec 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/division1.fs
@@ -1,4 +1,4 @@
-module division1
+module division1
//
let number1 = 16.8m
@@ -8,4 +8,4 @@ printfn $"{number1:N2} / {number2:N2} = {number3:N2}"
// The example displays the following output:
// 16.80 / 4.10 = 4.10
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs b/snippets/fsharp/System/Decimal/op_Addition/equality1.fs
similarity index 92%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/equality1.fs
index e327b0b9404..fda6e9c379e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/equality1.fs
@@ -1,4 +1,4 @@
-module equality1
+module equality1
//
open System
@@ -14,4 +14,4 @@ printfn $"{rounded1} = {rounded2}: {rounded1 = rounded2}"
// The example displays the following output:
// 16354.0695 = 16354.0699: False
// 16354.07 = 16354.07: True
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj b/snippets/fsharp/System/Decimal/op_Addition/fs.fsproj
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj
rename to snippets/fsharp/System/Decimal/op_Addition/fs.fsproj
index 642e6efd963..042ad949745 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/op_Addition/fs.fsproj
@@ -20,4 +20,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs b/snippets/fsharp/System/Decimal/op_Addition/greaterthan1.fs
similarity index 91%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/greaterthan1.fs
index f0ec66415a7..1fa46905051 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthan1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/greaterthan1.fs
@@ -1,4 +1,4 @@
-module greaterthan1
+module greaterthan1
//
open System
@@ -14,4 +14,4 @@ printfn $"{number1} > {number2}: {number1 > number2}"
// The example displays the following output:
// 16354.0699 > 16354.0695: True
// 16354.07 > 16354.07: False
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs b/snippets/fsharp/System/Decimal/op_Addition/greaterthanorequal1.fs
similarity index 89%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/greaterthanorequal1.fs
index 698e9044f1b..8105cf2bf4d 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/greaterthanorequal1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/greaterthanorequal1.fs
@@ -1,4 +1,4 @@
-module greaterthanorequal1
+module greaterthanorequal1
//
open System
@@ -14,4 +14,4 @@ printfn $"{number1} >= {number2}: {number1 >= number2}"
// The example displays the following output:
// 16354.0699 >= 16354.0695: True
// 16354.07 >= 16354.07: True
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs b/snippets/fsharp/System/Decimal/op_Addition/increment1.fs
similarity index 88%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/increment1.fs
index d1cc07f495b..9ee3d80d7cd 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/increment1.fs
@@ -1,4 +1,4 @@
-module increment1
+module increment1
//
open System
@@ -10,4 +10,4 @@ printfn $"Incremented value: {Decimal.op_Increment number:N}"
// The example displays the following output:
// Original value: 1,079.80
// Incremented value: 1,080.80
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs b/snippets/fsharp/System/Decimal/op_Addition/increment2.fs
similarity index 88%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs
rename to snippets/fsharp/System/Decimal/op_Addition/increment2.fs
index ac358c7c4e5..8d9b5510123 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/increment2.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/increment2.fs
@@ -1,4 +1,4 @@
-module increment2
+module increment2
//
open System
@@ -10,4 +10,4 @@ printfn $"Incremented value: {Decimal.Add(number, 1):N}"
// The example displays the following output:
// Original value: 1,079.80
// Incremented value: 1,080.80
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs b/snippets/fsharp/System/Decimal/op_Addition/inequality1.fs
similarity index 91%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/inequality1.fs
index b6a10f835a9..f3b2b556655 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/inequality1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/inequality1.fs
@@ -1,4 +1,4 @@
-module inequality1
+module inequality1
//
open System
@@ -14,4 +14,4 @@ printfn $"{rounded1} <> {rounded2}: {rounded1 <> rounded2}"
// The example displays the following output:
// 16354.0695 <> 16354.0699: True
// 16354.07 <> 16354.07: False
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs b/snippets/fsharp/System/Decimal/op_Addition/lessthan1.fs
similarity index 91%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/lessthan1.fs
index c55a3bc4fcc..a52f06e3022 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthan1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/lessthan1.fs
@@ -1,4 +1,4 @@
-module lessthan1
+module lessthan1
//
open System
@@ -14,4 +14,4 @@ printfn $"{rounded1} < {rounded2}: {rounded1 < rounded2}"
// The example displays the following output:
// 16354.0699 < 16354.0695: False
// 16354.07 < 16354.07: False
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs b/snippets/fsharp/System/Decimal/op_Addition/lessthanorequal1.fs
similarity index 90%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/lessthanorequal1.fs
index af5bb288605..9f11558cf4b 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/lessthanorequal1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/lessthanorequal1.fs
@@ -1,4 +1,4 @@
-module lessthanorequal1
+module lessthanorequal1
//
open System
@@ -14,4 +14,4 @@ printfn $"{rounded1} <= {rounded2}: {rounded1 <= rounded2}"
// The example displays the following output:
// 16354.0699 <= 16354.0695: False
// 16354.07 <= 16354.07: True
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs b/snippets/fsharp/System/Decimal/op_Addition/modulus1.fs
similarity index 86%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/modulus1.fs
index ed1fe5749ef..b10c10383da 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/modulus1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/modulus1.fs
@@ -1,4 +1,4 @@
-module modulus
+module modulus
//
let number1 = 16.8m
@@ -8,4 +8,4 @@ printfn $"{number1:N2} %% {number2:N2} = {number3:N2}"
// The example displays the following output:
// 16.80 % 4.10 = 0.40
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs b/snippets/fsharp/System/Decimal/op_Addition/multiply1.fs
similarity index 86%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/multiply1.fs
index ca0a1b10eed..962db556f06 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/multiply1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/multiply1.fs
@@ -1,4 +1,4 @@
-module multiply1
+module multiply1
//
let number1 = 16.8m
@@ -8,4 +8,4 @@ printfn $"{number1:N2} x {number2:N2} = {number3:N2}"
// The example displays the following output:
// 16.80 x 4.10 = 68.88
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs b/snippets/fsharp/System/Decimal/op_Addition/subtraction1.fs
similarity index 85%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs
rename to snippets/fsharp/System/Decimal/op_Addition/subtraction1.fs
index 4ebaddcd8ce..67cdbcfdab4 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/subtraction1.fs
+++ b/snippets/fsharp/System/Decimal/op_Addition/subtraction1.fs
@@ -1,4 +1,4 @@
-module subtraction1
+module subtraction1
//
let number1 = 120.07m
@@ -8,4 +8,4 @@ printfn $"{number1} - {number2} = {number3}"
// The example displays the following output:
// 120.07 - 163.19 = -43.12
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs b/snippets/fsharp/System/Decimal/op_Explicit/cfromchar.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/cfromchar.fs
index 1605c23b094..9da73909e35 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromchar.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/cfromchar.fs
@@ -1,4 +1,4 @@
-module cfromchar
+module cfromchar
//
// Define a list of Char values.
@@ -17,4 +17,4 @@ for value in values do
// 'a' (Char) --> 97 (Decimal)
// '{' (Char) --> 123 (Decimal)
// 'Æ' (Char) --> 198 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs b/snippets/fsharp/System/Decimal/op_Explicit/cfromdouble.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/cfromdouble.fs
index 93d59e8a87f..b0c58f2b8e8 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromdouble.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/cfromdouble.fs
@@ -1,4 +1,4 @@
-module cfromdouble
+module cfromdouble
//
// Example of the explicit conversion from double to decimal.
@@ -48,4 +48,4 @@ decimalFromDouble 1.234567890123456789E+30
// 1.2345678901234568E+012 1234567890123.46
// 1.2345678901234568E+028 12345678901234600000000000000
// 1.2345678901234569E+030 OverflowException
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs b/snippets/fsharp/System/Decimal/op_Explicit/cfromsingle.fs
similarity index 97%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/cfromsingle.fs
index eac9d5e9e6c..abda8208835 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.Others/FS/cfromsingle.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/cfromsingle.fs
@@ -1,9 +1,7 @@
-module cfromsingle
+module cfromsingle
//
// Example of the explicit conversion from float to decimal.
-open System
-
let print obj1 obj2 = printfn $"{obj1,16:E7}{obj2,33}"
// Get the exception type name; remove the namespace prefix.
@@ -49,4 +47,4 @@ decimalFromSingle 1.2345678E+30f
// 1.2345670E+012 1234567000000
// 1.2345678E+028 12345680000000000000000000000
// 1.2345678E+030 OverflowException
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctochar.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctochar.fs
index a65e5948e72..5c9459e99f7 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctochar.fs
@@ -1,4 +1,4 @@
-module ctochar
+module ctochar
//
open System
@@ -30,4 +30,4 @@ for value in values do
// 8250 --> > (203A)
// OverflowException: Cannot convert 65536
// OverflowException: Cannot convert -1
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctos_byte.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctos_byte.fs
index b5a22e4987e..a0a6122ba6e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctos_byte.fs
@@ -1,4 +1,4 @@
-module ctos_byte
+module ctos_byte
//
open System
@@ -29,4 +29,4 @@ for value in values do
// OverflowException: Cannot convert -1
// OverflowException: Cannot convert -128.999
// OverflowException: Cannot convert -129
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctosgl_dbl.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctosgl_dbl.fs
index 37a1c8a1fab..22e662d543f 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctosgl_dbl.fs
@@ -1,4 +1,4 @@
-module ctosgl_dbl
+module ctosgl_dbl
//
open System
@@ -26,4 +26,4 @@ for value in values do
// 123456789123456789123456789 (Decimal) --> 1.23456789123457E+26 (Double)
// -79228162514264337593543950335 (Decimal) --> -7.92281625142643E+28 (Double)
// 79228162514264337593543950335 (Decimal) --> 7.92281625142643E+28 (Double)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int16.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctou_int16.fs
index 9b266353dd0..cf9383be502 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int16.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int16.fs
@@ -1,4 +1,4 @@
-module ctou_int16
+module ctou_int16
//
// Example of the explicit conversions from decimal to short and
@@ -62,4 +62,4 @@ decimalToU_Int16 -32769M
// -1 -1 OverflowException
// -32768.999 -32768 OverflowException
// -32769 OverflowException OverflowException
-//
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int32.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctou_int32.fs
index 78cdf0664f3..509db144449 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int32.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int32.fs
@@ -1,4 +1,4 @@
-module ctou_int32
+module ctou_int32
//
// Example of the explicit conversions from decimal to int and
@@ -62,4 +62,4 @@ decimalToU_Int32 -2147483649M
// -1 -1 OverflowException
// -2147483648.999 -2147483648 OverflowException
// -2147483649 OverflowException OverflowException
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int64.fs
similarity index 98%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/ctou_int64.fs
index 914f2cbbc38..f8f5c121e93 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctou_int64.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/ctou_int64.fs
@@ -1,4 +1,4 @@
-module ctou_int64
+module ctou_int64
//
// Example of the explicit conversions from decimal to long and
@@ -62,4 +62,4 @@ decimalToU_Int64 -9223372036854775809M
// -1 -1 OverflowException
// -9223372036854775808.999 -9223372036854775808 OverflowException
// -9223372036854775809 OverflowException OverflowException
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj b/snippets/fsharp/System/Decimal/op_Explicit/fs.fsproj
similarity index 68%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/op_Explicit/fs.fsproj
index dd67eb6263b..a0a20eb52e0 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/op_Explicit/fs.fsproj
@@ -4,11 +4,16 @@
net6.0
+
-
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs b/snippets/fsharp/System/Decimal/op_Explicit/tosbyte.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/tosbyte.fs
index 2ecd8a73cf0..591a4a3c37d 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosbyte.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/tosbyte.fs
@@ -1,4 +1,4 @@
-module tosbyte
+module tosbyte
//
open System
@@ -27,4 +27,4 @@ for value in values do
// -1 (Decimal) --> -1 (SByte)
// -128.999 (Decimal) --> -128 (SByte)
// OverflowException: Cannot convert -129
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs b/snippets/fsharp/System/Decimal/op_Explicit/tosingle1.fs
similarity index 96%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs
rename to snippets/fsharp/System/Decimal/op_Explicit/tosingle1.fs
index 950dfae8432..347011a1552 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators.explicit/fs/tosingle1.fs
+++ b/snippets/fsharp/System/Decimal/op_Explicit/tosingle1.fs
@@ -1,4 +1,4 @@
-module tosingle1
+module tosingle1
//
open System
@@ -26,4 +26,4 @@ for value in values do
// 123456789123456789123456789 (Decimal) --> 1.234568E+26 (Single)
// -79228162514264337593543950335 (Decimal) --> -7.922816E+28 (Single)
// 79228162514264337593543950335 (Decimal) --> 7.922816E+28 (Single)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfrombyte.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfrombyte.fs
index f2368a8a6e4..8e9f16661d6 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfrombyte.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfrombyte.fs
@@ -1,4 +1,4 @@
-module cfrombyte
+module cfrombyte
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 63 (Byte) --> 63 (Decimal)
// 123 (Byte) --> 123 (Decimal)
// 200 (Byte) --> 200 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromint16.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromint16.fs
index 899cbdfd13b..8e9d5bee0be 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint16.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromint16.fs
@@ -1,4 +1,4 @@
-module cfromint16
+module cfromint16
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 4095 (Int16) --> 4095 (Decimal)
// 12345 (Int16) --> 12345 (Decimal)
// -10000 (Int16) --> -10000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromint32.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromint32.fs
index a7642e5e90e..ac011bca79d 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint32.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromint32.fs
@@ -1,4 +1,4 @@
-module cfromint32
+module cfromint32
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 16777215 (Int32) --> 16777215 (Decimal)
// 123456789 (Int32) --> 123456789 (Decimal)
// -1000000000 (Int32) --> -1000000000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromint64.fs
similarity index 93%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromint64.fs
index d9651ecdb9e..db4a3056c7e 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromint64.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromint64.fs
@@ -1,4 +1,6 @@
-//
+module cfromint64
+
+//
open System
// Define a list of 64-bit integer values.
@@ -16,4 +18,4 @@ for value in values do
// 281474976710655 (Int64) --> 281474976710655 (Decimal)
// 123456789123456789 (Int64) --> 123456789123456789 (Decimal)
// -1000000000000000 (Int64) --> -1000000000000000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromsbyte.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromsbyte.fs
index 4adc2137b5f..12ccadb2fe4 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.SInts/FS/cfromsbyte.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromsbyte.fs
@@ -1,4 +1,4 @@
-module cfromsbyte
+module cfromsbyte
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 63 (SByte) --> 63 (Decimal)
// 123 (SByte) --> 123 (Decimal)
// -100 (SByte) --> -100 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint16.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromuint16.fs
index e98b3436632..0f4bd619245 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint16.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint16.fs
@@ -1,4 +1,4 @@
-module cfromuint16
+module cfromuint16
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 4095 (UInt16) --> 4095 (Decimal)
// 12345 (UInt16) --> 12345 (Decimal)
// 40000 (UInt16) --> 40000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint32.fs
similarity index 94%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromuint32.fs
index 96816201da6..78455a54915 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint32.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint32.fs
@@ -1,4 +1,4 @@
-module cfromuint32
+module cfromuint32
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 16777215 (UInt32) --> 16777215 (Decimal)
// 123456789 (UInt32) --> 123456789 (Decimal)
// 4000000000 (UInt32) --> 4000000000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint64.fs
similarity index 95%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs
rename to snippets/fsharp/System/Decimal/op_Implicit/cfromuint64.fs
index 611ff438f72..a3578cd8898 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/cfromuint64.fs
+++ b/snippets/fsharp/System/Decimal/op_Implicit/cfromuint64.fs
@@ -1,4 +1,4 @@
-module cfromuint64
+module cfromuint64
//
open System
@@ -18,4 +18,4 @@ for value in values do
// 281474976710655 (UInt64) --> 281474976710655 (Decimal)
// 123456789123456789 (UInt64) --> 123456789123456789 (Decimal)
// 1000000000000000 (UInt64) --> 1000000000000000 (Decimal)
-//
\ No newline at end of file
+//
\ No newline at end of file
diff --git a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj b/snippets/fsharp/System/Decimal/op_Implicit/fs.fsproj
similarity index 68%
rename from samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj
rename to snippets/fsharp/System/Decimal/op_Implicit/fs.fsproj
index 3745d7091a5..a2af61f62ce 100644
--- a/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvFrom.UInts/FS/fs.fsproj
+++ b/snippets/fsharp/System/Decimal/op_Implicit/fs.fsproj
@@ -5,6 +5,10 @@
+
+
+
+
diff --git a/xml/System/Decimal.xml b/xml/System/Decimal.xml
index fed4b0992d5..a196e460523 100644
--- a/xml/System/Decimal.xml
+++ b/xml/System/Decimal.xml
@@ -113,17 +113,17 @@
## Remarks
The value type represents decimal numbers ranging from positive 79,228,162,514,264,337,593,543,950,335 to negative 79,228,162,514,264,337,593,543,950,335. The default value of a `Decimal` is 0. The value type is appropriate for financial calculations that require large numbers of significant integral and fractional digits and no round-off errors. The type does not eliminate the need for rounding. Rather, it minimizes errors due to rounding. For example, the following code produces a result of 0.9999999999999999999999999999 instead of 1.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal1.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Overview/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal1.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Overview/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Overview/DecimalDivision_46630_1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet1":::
When the result of the division and multiplication is passed to the method, the result suffers no loss of precision, as the following code shows.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal2.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Class/fs/DecimalDivision_46630_1.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Overview/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Class/cpp/decimal2.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Overview/DecimalDivision_46630_1.cs" interactive="try-dotnet-method" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Overview/DecimalDivision_46630_1.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Class/vb/DecimalDivision_46630_1.vb" id="Snippet2":::
A decimal number is a floating-point value that consists of a sign, a numeric value where each digit in the value ranges from 0 to 9, and a scaling factor that indicates the position of a floating decimal point that separates the integral and fractional parts of the numeric value.
@@ -152,10 +152,10 @@
## Examples
The following code example demonstrates the use of .
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Overview/source.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet1":::
]]>
@@ -241,10 +241,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctordo.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctordo.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctordo.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctordo.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctordo.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctordo.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctordo.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctordo.vb" id="Snippet2":::
]]>
@@ -300,10 +300,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctori.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctori.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctori.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctori.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctori.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctori.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctori.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctori.vb" id="Snippet1":::
]]>
@@ -374,10 +374,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an array of four values.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriarr.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriarr.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctoriarr.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriarr.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriarr.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriarr.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctoriarr.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriarr.vb" id="Snippet1":::
]]>
@@ -435,10 +435,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with an value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorl.cpp" id="Snippet3":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorl.fs" id="Snippet3":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctorl.cs" interactive="try-dotnet" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorl.vb" id="Snippet3":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorl.cpp" id="Snippet3":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorl.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorl.fs" id="Snippet3":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorl.vb" id="Snippet3":::
]]>
@@ -528,10 +528,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctors.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/FS/ctors.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctors.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctors.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/CPP/ctors.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctors.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctors.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Reals/VB/ctors.vb" id="Snippet1":::
]]>
@@ -593,10 +593,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorui.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorui.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctorui.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorui.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorui.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorui.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorui.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorui.vb" id="Snippet2":::
]]>
@@ -652,10 +652,10 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with a value.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorul.cpp" id="Snippet4":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/FS/ctorul.fs" id="Snippet4":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctorul.cs" interactive="try-dotnet" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorul.vb" id="Snippet4":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/CPP/ctorul.cpp" id="Snippet4":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctorul.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctorul.fs" id="Snippet4":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Ints/VB/ctorul.vb" id="Snippet4":::
]]>
@@ -719,16 +719,16 @@
## Examples
The following code example creates several `Decimal` numbers using the constructor overload that initializes a `Decimal` structure with three value words, a sign, and a scale factor.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriiibby.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/FS/ctoriiibby.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctoriiibby.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriiibby.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/CPP/ctoriiibby.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctoriiibby.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctoriiibby.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ctor.Arrays/VB/ctoriiibby.vb" id="Snippet2":::
The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
]]>
@@ -792,10 +792,10 @@
## Remarks
The following code sample illustrates the use of `Add` :
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet5":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet5":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet5":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet5":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet5":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Overview/source.fs" id="Snippet5":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet5":::
]]>
@@ -857,9 +857,9 @@
## Examples
The following example illustrates the method and contrasts it with the method.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
]]>
@@ -945,9 +945,9 @@
## Examples
The following example compares several values. Note that the first comparison indicates that the two values are equal despite the subtraction operation performed on the `value2` variable. This is because the type has 29 digits of precision, whereas a difference between these two values can be detected only with 30 digits of precision.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Compare/fs/Compare1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Compare/Compare1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Compare/vb/Compare1.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Compare/Compare1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Compare/Compare1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Compare/vb/Compare1.vb" id="Snippet1":::
]]>
@@ -1053,9 +1053,9 @@
## Examples
The following code example demonstrates generic and nongeneric versions of the method for several value and reference types.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/T.CompareTo/CPP/cat.cpp" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Boolean/CompareTo/cat.cs" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/T.CompareTo/VB/cat.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/T.CompareTo/CPP/cat.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Boolean/CompareTo/cat.cs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/T.CompareTo/VB/cat.vb" id="Snippet1":::
]]>
@@ -1142,10 +1142,10 @@
## Examples
The following code example compares several `Decimal` and other objects to a reference `Decimal` value using the `CompareTo` method.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
]]>
@@ -1211,9 +1211,9 @@
## Examples
The following example calls the method to divide a range of values by 22.1.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.Divide/fs/Divide1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Divide/vb/Divide1.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Divide/Divide1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Divide/Divide1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.Divide/vb/Divide1.vb" id="Snippet1":::
]]>
@@ -1306,9 +1306,9 @@
Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
@@ -1371,19 +1371,19 @@
## Examples
The following code example compares several `Decimal` and other objects to a reference `Decimal` value using the `Equals` method.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/cto_eq_obj.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/cto_eq_obj.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/cto_eq_obj.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/cto_eq_obj.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/cto_eq_obj.vb" id="Snippet1":::
]]>
Compiler overload resolution may account for an apparent difference in the behavior of the two method overloads. If an implicit conversion between the argument and a is defined and the argument is not typed as an , compilers may perform an implicit conversion and call the method. Otherwise, they call the method, which always returns if its argument is not a value. The following example illustrates the difference in behavior between the two method overloads. In the case of all primitive integral types, including both signed and unsigned types, the first comparison returns because the compiler automatically performs a widening conversion and calls the method, whereas the second comparison returns because the compiler calls the method.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.equals/fs/equalsoverl.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Equals/equalsoverl.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Equals/equalsoverl.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.equals/vb/equalsoverl.vb" id="Snippet2":::
@@ -1446,10 +1446,10 @@
## Examples
The following code example compares several `Decimal` values to a reference `Decimal` value using the static `Equals` method.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/comp_equal.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/FS/comp_equal.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/CompareTo/comp_equal.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/comp_equal.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/CPP/comp_equal.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/CompareTo/comp_equal.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/CompareTo/comp_equal.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Compare_Equals/VB/comp_equal.vb" id="Snippet2":::
]]>
@@ -1520,9 +1520,9 @@
## Examples
The following example illustrates the method and contrasts it with the method.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Ceiling/fs/ceiling1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Ceiling/ceiling1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Ceiling/ceiling1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Ceiling/vb/Ceiling1.vb" id="Snippet1":::
]]>
@@ -1576,10 +1576,10 @@
## Examples
The following code example uses the `FromOACurrency` method to convert fields that contain OLE Automation Currency values to the equivalent `Decimal` numbers.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CPP/fromoacurrency.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.OACurrency/FS/fromoacurrency.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/FromOACurrency/fromoacurrency.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.OACurrency/VB/fromoacurrency.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.OACurrency/CPP/fromoacurrency.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/FromOACurrency/fromoacurrency.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/FromOACurrency/fromoacurrency.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.OACurrency/VB/fromoacurrency.vb" id="Snippet2":::
]]>
@@ -1655,16 +1655,16 @@
## Examples
The following example uses the `GetBits` method to convert several `Decimal` values to their equivalent binary representations. It then displays the decimal values and the hexadecimal value of the elements in the array returned by the method.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/getbits.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/getbits.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/GetBits/getbits.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/getbits.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/getbits.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/getbits.cs" interactive="try-dotnet" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/GetBits/getbits.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/getbits.vb" id="Snippet2":::
The following example uses the method to retrieve the component parts of an array. It then uses this array in the call to the constructor to instantiate a new value.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.ctor/fs/ctor2a.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/.ctor/ctor2a.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/.ctor/ctor2a.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.ctor/vb/ctor2a.vb" id="Snippet1":::
]]>
@@ -1799,10 +1799,10 @@
## Examples
The following code example uses the `GetTypeCode` method to return the type code for `Decimal` value type.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/gettypecode.cpp" id="Snippet3":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/FS/gettypecode.fs" id="Snippet3":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/GetBits/gettypecode.cs" interactive="try-dotnet" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/gettypecode.vb" id="Snippet3":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/CPP/gettypecode.cpp" id="Snippet3":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/GetBits/gettypecode.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/GetBits/gettypecode.fs" id="Snippet3":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Get_Bits_Hash_Type/VB/gettypecode.vb" id="Snippet3":::
]]>
@@ -1856,10 +1856,10 @@
## Examples
The following code sample illustrates the use of `MaxValue` :
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet2":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR/Decimal Example/FS/source.fs" id="Snippet2":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet2":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet2":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Decimal Example/CPP/source.cpp" id="Snippet2":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Overview/source.cs" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Overview/source.fs" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/Decimal Example/VB/source.vb" id="Snippet2":::
]]>
@@ -1912,10 +1912,10 @@
## Examples
The following code example illustrates the use of the `MinusOne` field.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -1973,10 +1973,10 @@
## Examples
The following code example illustrates the use of the `MinValue` field.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -2042,10 +2042,10 @@
## Examples
The following code example creates several pairs of `Decimal` values and calculates their products with the `Multiply` method.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/CPP/mul_div_rem.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/FS/mul_div_rem.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Multiply/mul_div_rem.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/VB/mul_div_rem.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/CPP/mul_div_rem.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Multiply/mul_div_rem.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Multiply/mul_div_rem.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Mul_Div_Rem/VB/mul_div_rem.vb" id="Snippet1":::
]]>
@@ -2107,10 +2107,10 @@
## Examples
The following code example uses the `Negate` method to change the sign of several `Decimal` values.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CPP/floor_neg_trunc.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/FS/floor_neg_trunc.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/VB/floor_neg_trunc.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/CPP/floor_neg_trunc.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/Negate/floor_neg_trunc.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/Negate/floor_neg_trunc.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Flr_Neg_Rnd_Trnc/VB/floor_neg_trunc.vb" id="Snippet1":::
]]>
@@ -2159,10 +2159,10 @@
## Examples
The following code example illustrates the use of the `One` field.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.Decimal.Fields/FS/fields.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Decimal.Fields/CPP/fields.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/MinusOne/fields.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/MinusOne/fields.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Decimal.Fields/VB/fields.vb" id="Snippet1":::
]]>
@@ -2228,9 +2228,9 @@
## Remarks
The method defines the operation of the addition operator for values. It enables code such as the following:
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/addition1.fs" id="Snippet3":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Addition/addition1.cs" interactive="try-dotnet" id="Snippet3":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/addition1.vb" id="Snippet3":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/addition1.cs" interactive="try-dotnet" id="Snippet3":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/addition1.fs" id="Snippet3":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/addition1.vb" id="Snippet3":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2288,18 +2288,18 @@
## Remarks
The method defines the operation of the decrement operator for values. It enables code such as the following:
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement1.fs" id="Snippet4":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Addition/decrement1.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement1.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/decrement1.fs" id="Snippet4":::
- Some languages (such as Visual Basic and F#) that lack an increment operator can call the method directly, as the following example shows.
+ Some languages (such as Visual Basic) that lack an increment operator can call the method directly, as the following example shows.
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement1.vb" id="Snippet5":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement1.vb" id="Snippet5":::
If your language does not support custom operators, call the method instead, as the following example shows.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/decrement2.fs" id="Snippet6":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Addition/decrement2.cs" interactive="try-dotnet" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement2.vb" id="Snippet6":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/decrement2.cs" interactive="try-dotnet" id="Snippet6":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/decrement2.fs" id="Snippet6":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/decrement2.vb" id="Snippet6":::
]]>
@@ -2363,9 +2363,9 @@
## Remarks
The method defines the operation of the division operator for values. It enables code such as the following:
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/division1.fs" id="Snippet7":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Addition/division1.cs" interactive="try-dotnet" id="Snippet7":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/division1.vb" id="Snippet7":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/division1.cs" interactive="try-dotnet" id="Snippet7":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/division1.fs" id="Snippet7":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/division1.vb" id="Snippet7":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2434,9 +2434,9 @@
## Remarks
The method defines the operation of the equality operator for values. It enables code such as the following:
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/system.decimal.operators/fs/equality1.fs" id="Snippet1":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Addition/equality1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/equality1.vb" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Addition/equality1.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Addition/equality1.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.decimal.operators/vb/equality1.vb" id="Snippet1":::
If the language you're using doesn't support custom operators, call the method instead.
@@ -2505,16 +2505,16 @@
to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
The following example converts numbers to values by using the explicit to conversion operator.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctos_byte.cpp" id="Snippet4":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctos_byte.fs" id="Snippet4":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Explicit/ctos_byte.cs" interactive="try-dotnet" id="Snippet4":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctos_byte.vb" id="Snippet4":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctos_byte.cpp" id="Snippet4":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctos_byte.cs" interactive="try-dotnet" id="Snippet4":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctos_byte.fs" id="Snippet4":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctos_byte.vb" id="Snippet4":::
]]>
@@ -2575,9 +2575,9 @@
## Examples
The following example converts numbers to values (Unicode characters) by using the explicit to conversion operator.
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctochar.fs" id="Snippet6":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Explicit/ctochar.cs" interactive="try-dotnet" id="Snippet6":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctochar.vb" id="Snippet6":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctochar.cs" interactive="try-dotnet" id="Snippet6":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctochar.fs" id="Snippet6":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctochar.vb" id="Snippet6":::
]]>
@@ -2634,16 +2634,16 @@
## Remarks
This operation can result in a loss of precision, because a double-precision floating-point number has fewer significant digits than a .
- This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, F#, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to a . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to a value by using C#, C++, and Visual Basic. To perform a conversion that is independent of language, you can call the or the method.
## Examples
The following example converts numbers to values by using the explicit to conversion operator.
- :::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctosgl_dbl.cpp" id="Snippet5":::
- :::code language="fsharp" source="~/samples/snippets/fsharp/VS_Snippets_CLR_System/System.Decimal.ConvTo/FS/ctosgl_dbl.fs" id="Snippet5":::
- :::code language="csharp" source="~/samples/snippets/csharp/System/Decimal/op_Explicit/ctosgl_dbl.cs" interactive="try-dotnet" id="Snippet5":::
- :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctosgl_dbl.vb" id="Snippet5":::
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/System.Decimal.ConvTo/CPP/ctosgl_dbl.cpp" id="Snippet5":::
+ :::code language="csharp" source="~/snippets/csharp/System/Decimal/op_Explicit/ctosgl_dbl.cs" interactive="try-dotnet" id="Snippet5":::
+ :::code language="fsharp" source="~/snippets/fsharp/System/Decimal/op_Explicit/ctosgl_dbl.fs" id="Snippet5":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Decimal.ConvTo/VB/ctosgl_dbl.vb" id="Snippet5":::
]]>
@@ -2697,16 +2697,16 @@
## Remarks
- This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, F#, Visual Basic, and C++. To perform a conversion that is independent of language, you can call the or the method.
+ This operator supports the explicit conversion of a to an . The syntax for such explicit conversions is language-dependent, and individual language compilers can provide different implementations and return different results. The example illustrates the different return values when you explicitly convert a value to an value by using C#, Visual Basic, and C++. To perform a conversion that is independent of language, you can call the