1

enter image description here

How can I get this property of recyclebin and switch it using C#.

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179
roy
  • 11
  • 2
  • 1
    One of those somewhat rare no-code and short SO questions that, if not a dup, will probably be helpful to future users. – Kirk Woll Mar 16 '17 at 02:38

1 Answers1

0

There is no supported way to do so irrespective of language.

As far as I understand there is no API to configure this settings. You can query information about recycle bin via PInvoke (SHQueryRecycleBin and empty (SHEmptyRecycleBin).

Couple ways to touch those settings can be found in Raymond Chen's blog post - What is default size of the Recycle Bin.... Summary below:

Alexei Levenkov
  • 98,904
  • 14
  • 127
  • 179