I have a number of objects in my project which have fields that will contain matching values when they're initialized - see the code snippet below for an example, in
particular the AddedDateTime and ModifiedDateTime properties:
User user = new User()
{
FirstName = "Tex",
Surname = "Murphy",
AddedDateTime = DateTime.Now,
ModifiedDateTime = DateTime.Now
};
Is it possible to set the value of ModifiedDateTime to the value of AddedDateTime, within the {...} block once it has been set?
I have a feeling it's not possible but thought it worth asking for confirmation.
ModifiedDateTime = AddedDateTime?AddedDateTime = ModifiedDateTime = DateTime.Nowif you'd like..The name 'AddedDateTime' does not exist in the current contextUser?