Load() public static méthode

Loads the specified file path.
public static Load ( string filePath ) : ManagedApplication
filePath string The file path.
Résultat ManagedApplication
        /// <summary>
        /// Adds an application to manage to the drop down menu.
        /// </summary>
        private int AddApplicationToManage(FileInfo fileInfo)
        {
            // ignore files that don't exist.
            if (fileInfo == null || !fileInfo.Exists)
            {
                return(ApplicationToManageCB.SelectedIndex);
            }

            try
            {
                ManagedApplication application = ManagedApplication.Load(fileInfo.FullName);

                if (application == null)
                {
                    return(ApplicationToManageCB.SelectedIndex);
                }

                // add to list.
                return(AddApplicationToManage(application));
            }

            // ignore errors.
            catch (Exception)
            {
                return(ApplicationToManageCB.SelectedIndex);
            }
        }