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”
Scenerio : Here we needs to call a a function to server on every minute,we can use use below code.
$(document).ready(function () {
snooze();
})
function snooze() {
$.ajax({
type: “GET”,
url: ‘URL’,
success: function (data) {
},
complete: function () {
// Schedule the next request when the current one’s complete
setTimeout(snooze, 10000);
}, error: function (xhr) {
},
});
In place of File.Delete(filePath); Use below code
System.GC.Collect();System.GC.WaitForPendingFinalizers();File.Delete(filePath);