I am migrating my windows based application into DOT NET CORE MVC WEB-BASED APPLICATION. During this time I am getting errors.
My variable details
private DateTime _dateTime = DateTime.Now;
private string _dateTimeFormat = "{0}:{1}:{2}";
The Method which I am going to execute.
internal static async Task<Asset> METHODNAME(PARAMETERS DETAILS)
{
...
//MY code here
await blockAsync.ContinueWith(t =>
{
UpdateDateTime(PASS PARAMETER DETAILS in DOUBLE);
}
}
UpdateDateTime function details.
private void UpdateDateTime(double Value)
{
// Update end time
_dateTime = DateTime.Now;
string CurrentTime = string.Format(_dateTimeFormat, _dateTime.Hour,
_dateTime.Minute, _dateTime.Second);
//Other Code Here
}