Quantcast
Viewing all articles
Browse latest Browse all 4356

RE: Sharing an instance of an object between classes.

I am attaching an example that contains a WinForms project that has a form and a couple of additional  classes including one that contains the static method that will either create a new object if required or return the current one if it already exists. This object will then be accessed in both the form and another class to show that the object is indeed the same one.

Thanks.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>