A solution had worked for me.
Just add a reference in solution from .Net Assemblies named as “Windowbase”
A solution had worked for me.
Just add a reference in solution from .Net Assemblies named as “Windowbase”
Input =”12:30am”;
Output=”00:30:00″
public TimeSpan GetTimeFromString(string timeString)
{
DateTime dateWithTime = DateTime.MinValue;
DateTime.TryParse(timeString, out dateWithTime);
return dateWithTime.TimeOfDay;
}
Scenario : I have a table want to get only n number of column(2 or 3 or so on) and I don’t want create a model i.e class to store that only data,Here I need tuple
List<Tuple<int,string>> data =db.Resource.Select(x => new { x.Resource_ID, x.Name }).AsEnumerable().Select(x => Tuple.Create(x.Resource_ID, x.Name)).ToList();
In place of File.Delete(filePath); Use below code
System.GC.Collect();System.GC.WaitForPendingFinalizers();File.Delete(filePath);