System.Globalization
I am running this code:
let dateRange (first:System.DateTime) count =
seq {for i in 0..(count-1) -> first.AddDays(float i)}
and getting this message:
"The type referenced through 'System.Globalization.CultureInfo is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Globalization'. (using external F# compiler)
I added System.Globalization.dll to the Query Properties/Additional References tab and I am still getting this message. What is wrong?
let dateRange (first:System.DateTime) count =
seq {for i in 0..(count-1) -> first.AddDays(float i)}
and getting this message:
"The type referenced through 'System.Globalization.CultureInfo is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Globalization'. (using external F# compiler)
I added System.Globalization.dll to the Query Properties/Additional References tab and I am still getting this message. What is wrong?
Comments
Environment: LINQPad5 (Free Edition) v5.36.03
Repo steps:
Open Query Properties with F4 key
Use "Add..." button to "Add Custom Assembly Reference"
Add "System.Globalization"
Click "Set as default for new queries",
but I still cannot referencing " CultureInfo"
Here is the part of LINQ pipeline I am having trouble with:
.Select(n => new { Name = n[0].Trim(), DOB = DateTime.ParseExact(n[1].Trim(), "d/m/yyyy", CultureInfo.InvariantCulture) })
Thank you for your time and help!
F4 key to open Query Properties panel
Add mscorlib.dll
Under tab "Additonal Namespace Imports", click "Pick from assemblies"
Select assembly "mscorlib.dll" and namespace "System.Globalization.dll"
Thank you for making this great tool and other great presentations