locked
How to get value of the saving field under tools->options->Source Control->Environment->Saving. RRS feed

  • Question

  • How to get value of saving field under  tools->options->Source Control->Environment->Saving using c# code.

    Regards,

    Abhi

    • Moved by CoolDadTx Wednesday, September 21, 2016 3:35 PM Extensibility related
    Wednesday, September 21, 2016 12:11 PM

Answers

  • Hi abhi0022,

    We could use DTE Properties Collections to retrieve related code: like this:

    // Create and initialize a variable to represent the C# 
        // text editor options page.
        EnvDTE.Properties txtEdCS =
     dte.get_Properties( "Environment", "General" ); 
        EnvDTE.Property prop = null; 
        string msg = null; 
    
        // Loop through each item in the C# text editor options page. 
        foreach ( EnvDTE.Property temp in txtEdCS ) 
        { 
            prop = temp; 
            msg += ( "PROP NAME: " + prop.Name + "   VALUE: " 
    + prop.Value ) + "\n"; 
        }
        MessageBox.Show( msg); 

    For more information, please refer to:

    https://msdn.microsoft.com/en-us/library/ms165643.aspx

    https://msdn.microsoft.com/en-us/library/ms165641.aspx

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 22, 2016 8:50 AM

All replies

  • Hello,

     Are you asking about the VisualStudio IDE settings configuration file?

    Thanks :)

    Wednesday, September 21, 2016 12:39 PM
  • Hi abhi0022,

    We could use DTE Properties Collections to retrieve related code: like this:

    // Create and initialize a variable to represent the C# 
        // text editor options page.
        EnvDTE.Properties txtEdCS =
     dte.get_Properties( "Environment", "General" ); 
        EnvDTE.Property prop = null; 
        string msg = null; 
    
        // Loop through each item in the C# text editor options page. 
        foreach ( EnvDTE.Property temp in txtEdCS ) 
        { 
            prop = temp; 
            msg += ( "PROP NAME: " + prop.Name + "   VALUE: " 
    + prop.Value ) + "\n"; 
        }
        MessageBox.Show( msg); 

    For more information, please refer to:

    https://msdn.microsoft.com/en-us/library/ms165643.aspx

    https://msdn.microsoft.com/en-us/library/ms165641.aspx

    Best regards,

    Cole Wu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, September 22, 2016 8:50 AM