deleyd
asked on
make a copy of a DateTime variable
Can I do this to make a copy of a DateTime variable, or does my resulting variable MyDT just point to dt which then disappears?
DateTime MyDT;
private void myfunc()
{
DateTime dt = DateTime.Now;
MyDT = dt;
}
I recall if you want to make a copy of a class instance you have to copy all the internals of the class instance, you can't just say myclasscopy = myclass.ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Therefore you can do that.