Skip to main content
All docs
V25.1
  • EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder) Method

    Prevents DevExpress controls from getting the path to the specified system special folder.

    Namespace: DevExpress.Data.Utils

    Assembly: DevExpress.Data.v25.1.dll

    NuGet Package: DevExpress.Data

    Declaration

    public static void SuppressReadingSpecialFolder(
        Environment.SpecialFolder folder
    )

    Parameters

    Name Type Description
    folder Environment.SpecialFolder

    The directory path to a system special folder.

    Remarks

    The following example activates the SuppressReadingSpecialFolder restrictive policy:

    using System;
    using System.Windows.Forms;
    
    namespace EnvironmentPolicyDemo {
        internal static class Program {
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            [STAThread]
            static void Main() {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                DevExpress.Data.Utils.EnvironmentPolicy.SuppressReadingSpecialFolder(Environment.SpecialFolder.System);
                Application.Run(new Form1());
            }
        }
    }
    

    Tip

    Read the following topic for additional information: Environment Policy.

    See Also