EDIFileLoader – Getting Time Elapsed

Index

    Getting Time Elapsed

    Developers can check how long it takes to load an EDI file using the TimeElapsed property of the EDIFileLoader component. The TimeElapsed property will give the number of milliseconds it took to load the file.

    There are two ways to get the elapsed time. One way is through the TimeElapsed property. The other way is to subscribe to the FileLoadingComplete event. It contains the Milliseconds property in its eventargs object.

    Example 1

    // Use the TimeElapsed property after loading
    loader.TimeElapsed;

    Example 2

    loader. FileLoadingCompleted += new EDIFileLoader.EDIFileLoadingCompletedEvent(loader_loadingCompleted);

    private void loader_loadingCompleted (object sender, FileLoadingEventArgs e)
    {
       MessageBox.Show(e.Milliseconds);
    }
    in EDI File Loader
    Did this article answer your question?