views:

347

answers:

4

Is there a way in C# to calculate given a Lat and Long when the sun will set and rise for a given day?

Ian

+3  A: 

Javascript calculations here. Now you just need to port.

AnthonyWJones
+1  A: 

Also, try this link...

http://www.codeproject.com/KB/cs/suntimes.aspx

Sparky
+1  A: 

I haven't tested this, but I came across this thread on MSDN which is answered:

Get sunrise and sunset time based on latitude and longitude

Kevin McKelvin
+1  A: 

Also take a look at this one http://www.codeproject.com/KB/recipes/SolarCalculator.aspx

kalkie