I’m trying to understand how the implementation of the Now attribute in DateTime works. My background is mainly Python and Haskell so I can’t by my life understand how the Now attribute can “return” different values depending on when you use it.
My intuition says that Now should really be a function which does some low-level magic followed by some high-level magic and then returns a DateTime object with the correct time.
DateTime.Now isn’t an attribute, it’s a static readonly property.
Under the covers a readonly property is just a function call that returns a value, so it can do any amount of processing it wants to.
Hope this helps.