How does one access a control from a static method?

A static method doesn’t have access to members like txtDisplayMessages because it is not a part of that instance. I suggest you do some reading on the concepts of static methods and whatnot, because that is a fairly language agnostic concept. That method would best be served by removing the static modifier, because it doesn’t need to be static – it appears that it would need to be called by that particular instance of that object.

Leave a Comment