C
C#13mo ago
toxidworm

Is it possible to access windows objects in a static method?

4 Replies
toxidworm
toxidwormOP13mo ago
Angius
Angius13mo ago
Seeing how a static method does not require an instance of the class, and this refers to the current instance of said class... no
toxidworm
toxidwormOP13mo ago
Understood
Mayor McCheese
Mayor McCheese13mo ago
You could pass the window object in, but at that point, but at that point you might as well not have a private static. The only reasons at that point for a private static are artificial.

Did you find this page helpful?