A sidestep of the series around Writing a tool that restarts the Google Chat desktop app Window (and hopefully the Google Duo desktop app Window too):
Enumerating Windows and especially Child Windows is a recursive endeavour, so I wondered if it was possible to write a self referencing delegate, anonymous method or lambda in C#.
That turns out to be way more complicated than I hoped for.
Some notes below, as:
- one day I might want to rewrite the core to use this technique just for learning purposes
- finding these links was quite a bit harder than expected due to link rot often caused by missing redirects (especially on the Microsoft blog sites: for one as not all their blog members are still with them which means content got ditched, and also because they moved through a couple of blog platforms so the really old links to not redirect, not even while tracking them through the Wayback Machine, or the content is incomplete which is why all below links are both in the Wayback Machine and Archive.is)
Here we go:





