Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Created July 11, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/89ecf896aac1fc78f58f491f633201e7 to your computer and use it in GitHub Desktop.
Save lgolubyev/89ecf896aac1fc78f58f491f633201e7 to your computer and use it in GitHub Desktop.
// A couple constructors to choose from.
public TimeOnly(int hour, int minute)
public TimeOnly(int hour, int minute, int second)
public TimeOnly(int hour, int minute, int second, int millisecond)
TimeOnly nineInTheMorning = new TimeOnly(9, 0);
TimeOnly currentUtcTime = TimeOnly.FromDateTime(DateTime.UtcNow);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment