Defining a new object from another namespace class.
Posted: Sun Jun 18, 2017 12:27 am
Hi Balazs,
(or anyone else who can explain this).
Trying to get a deeper understanding of the example plugin. At the beginning we have this line:
My understanding is that this creates a new instance/object of class "Entry" of the namespace "Plugininterface".
From my C# studies, I've only encountered this way of creating a new object of a class:
However, those types of example were in the same namespace, so I would expect the correct way to be:
or something like that. So that's why I'm confused about the way the plugin example creates the UC object and adds the "public" access modifier too:
So this sounds to me like a "public object" is being created, but I've never heard of that so far. Have I got it completely wrong.
Keith.
(or anyone else who can explain this).
Trying to get a deeper understanding of the example plugin. At the beginning we have this line:
- Code: Select all
public Plugininterface.Entry UC;
My understanding is that this creates a new instance/object of class "Entry" of the namespace "Plugininterface".
From my C# studies, I've only encountered this way of creating a new object of a class:
- Code: Select all
Entry UC = new Entry();
However, those types of example were in the same namespace, so I would expect the correct way to be:
- Code: Select all
Plugininterface.Entry UC = new Plugininterface.Entry();
or something like that. So that's why I'm confused about the way the plugin example creates the UC object and adds the "public" access modifier too:
- Code: Select all
public Plugininterface.Entry UC;
So this sounds to me like a "public object" is being created, but I've never heard of that so far. Have I got it completely wrong.
Keith.