#light
module Strangelights.DemoModule
open System
// returns the hour and minute from the give date as a tuple
let hourAndMinute (time: DateTime) = time.Hour, time.Minute
// returns the hour from the given date
let hour (time: DateTime) = time.Hour
// returns the minutes from the given date
let minute (time: DateTime) = time.Minute
// !!! C# Source !!!
using System;
using Strangelights;
using Microsoft.FSharp.Core;
static class PrintClass {
internal static void HourMinute() {
// call the "hourAndMinute" function and collect the
// tuple that‘s returned
Tuple<int, int> t = DemoModule.hourAndMinute(DateTime.Now);
// print the tuple‘s contents
Console.WriteLine("Hour {0} Minute {1}", t.Item1, t.Item2);
}
}