If you are processing objects in the Watch window and want to check the current generation of that object, you can easily get it by calling GC.getGeneration(YourObjectName).
![How to Get Object Generation using Watch Window - https://codeconfig.in 01 Get Object Generation using Watch Window - https://codeconfig.in](https://i0.wp.com/codeconfig.in/wp-content/uploads/2023/10/01_Get_Object_Generation_using_Watch_Window.png?resize=525%2C206&ssl=1)
Must read:
If you create an object ID in a view window, such as (image #1 above), you can also see the generation of a newly created object ID GC.getGeneration(#id)
![How to Get Object Generation using Watch Window - https://codeconfig.in 21 Get Object Generation using Watch Window - https://codeconfig.in](https://i0.wp.com/codeconfig.in/wp-content/uploads/2023/10/21_Get_Object_Generation_using_Watch_Window.png?resize=525%2C151&ssl=1)
I hope you learned new thing and will use this in your daily development practices. You can check more articles on our website under C# section HERE or you can also check same on Microsoft Docs too.