From the course: AutoCAD Add-ins Using VB.NET

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Using the shared keyword

Using the shared keyword - AutoCAD Tutorial

From the course: AutoCAD Add-ins Using VB.NET

Start my 1-month free trial

Using the shared keyword

- [Narrator] So far we've worked with Objects and we've seen that we have to create a new instance any time we want to work with any properties in an Object. And there are times though that we want to accomplish a function or some type of, run a routine, or something similar to that, that's within an Object or a Class without having to create an instance every single time. We just want to, again, we're just using it as a collection of code. So, we're going to look at a key word that will help us accomplish that. So I'm going to open up our exercise project that's within our desktop here, exercise folder, Chapter seven, and we're going to go in the 07-03 solution. Now this is the same project that we've been working in in the last two exercises, this is a chapter focused on object-oriented programming. I've created a new folder and put all my Object Classes within that folder, and then if I go inside my Layer Object Class, it's actually, this is a file, a .vb file, and you can have…

Contents