"Veeranna Ronad" wrote:
> Hello,
>
> Our application gets datetime from an interface function. This
> function returns "ValueType". How to copy datetime content from this
> "ValueType" to DateTime variable?
>
> Thanks in advance and regards,
> Veeranna Ronad.
>
Hi Veeranna,
A direct cast should work, although I can't imagine why you would return a
the date as "ValueType".
public ValueType GetDate()
{
return DateTime.Now;
}
....
DateTime dt = (DateTime)GetDate();
--
Happy Coding!
Morten Wennevik [C# MVP]
|