Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27512

Partial class: Can I detect instantiation?

$
0
0
Say that I have a class called "HighClass" to which I want to add additional functionality. So, I write a partial class like this:

Code:

Partial Class HighClass
    '...new methods and properties
End Class

Now, when someone instantiates HighClass, I'd like to be able to run some start-up code in my partial class. How can I (can I?) detect instantiation from within my partial class so that I can do my start-up work?

Viewing all articles
Browse latest Browse all 27512

Trending Articles



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