CelestialMoonRise Property

Moon rise time.

Definition

Namespace: CoordinateSharp
Assembly: CoordinateSharp (in CoordinateSharp.dll) Version: 2.21.1.1
XMLNS for XAML: Not mapped to an xmlns.
C#
public DateTime? MoonRise { get; }

Property Value

NullableDateTime

Remarks

If DateTime is null, check the MoonCondition property.

Example

The following example gets the moon rise time in UTC at N 39, W 72 on 1-March-2018
C#
Coordinate coordinate = new Coordinate(39,-72, new DateTime(2018,3,1));
Console.WriteLine(coordinate.CelestialInfo.MoonRise); //3/1/2018 10:27:07 PM (UTC)
The following example demonstrates a returned null MoonRise value as the moon does not rise at N 39, W 72 on 1-March-2018. You can see why there is no value returned by checking the MoonCondition property to see that the moon is up all day at the specified location.
C#
Coordinate coordinate = new Coordinate(85,-72, new DateTime(2018,3,1));
Console.WriteLine(coordinate.CelestialInfo.MoonRise); //Returns Null
Console.WriteLine(coordinate.CelestialInfo.MoonCondition); //UpAllDay

See Also