I want to remove all dependencies to Microsoft.VisualBasic from my solution.
One thing that causes me problems is the "Now" function.
Does anybody know what would be a clean solution for a replacement?
Thank you!
I want to remove all dependencies to Microsoft.VisualBasic from my solution.
One thing that causes me problems is the "Now" function.
Does anybody know what would be a clean solution for a replacement?
Thank you!
You can use DateTime.Now
Dim now As Date = Date.Now
It is a Shared
property which means that you use it via classname without an instance.
If you remove Microsoft.VisualBasic
, you can use the Now
property that is part of System.DateTime
.