When I create my own class, to use the functions of that class I have to
create an object of that class and then I can access the functions of that
class,
for example:
dim obj1 as myclass
obj1 = new myclass
obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a
object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed
in the same fashion.. e.g.
myclass.myfunction("parameter") 23 1432
Take a look at the "static" and "shared" keywords. One of these two should
do this for you. What you're looking for is a non-instanced class
interface.
Mike Ober.
"patang" <pa****@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com... When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be
accessed in the same fashion.. e.g.
myclass.myfunction("parameter")
Take a look at the "static" and "shared" keywords. One of these two should
do this for you. What you're looking for is a non-instanced class
interface.
Mike Ober.
"patang" <pa****@discussions.microsoft.com> wrote in message
news:49**********************************@microsof t.com... When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be
accessed in the same fashion.. e.g.
myclass.myfunction("parameter")
I think you are talking about SHARED members. Triy using the SHARED keyword
when declaring your member. You should be able to access that class member
without instantiating an actual object first.
Hope this helps :o)
"patang" wrote: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion.. e.g.
myclass.myfunction("parameter")
I think you are talking about SHARED members. Triy using the SHARED keyword
when declaring your member. You should be able to access that class member
without instantiating an actual object first.
Hope this helps :o)
"patang" wrote: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion.. e.g.
myclass.myfunction("parameter")
"patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when
it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not
required when doing this. Functions defined in modules
are imported automatically and thus can be accessed
with their unqualified name (for example, 'Left' instead of
'Strings.Left').
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
"patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when
it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not
required when doing this. Functions defined in modules
are imported automatically and thus can be accessed
with their unqualified name (for example, 'Left' instead of
'Strings.Left').
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Does this mean that LEFT or RIGHT functions (methods) are declared as SHARED
in the STRINGS class ?
"Herfried K. Wagner [MVP]" wrote: "patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
Does this mean that LEFT or RIGHT functions (methods) are declared as SHARED
in the STRINGS class ?
"Herfried K. Wagner [MVP]" wrote: "patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
I have one public function in the class and many private functions. Public
functions uses those private functions. When I declare the public function as
"SHARED" then I can't access the private function from within public
functions, it says: " ....Cannot refer to an instance member of a class from
within a shared method or shared member initializer without an explicit
instance of the class....."
"Herfried K. Wagner [MVP]" wrote: "patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
I have one public function in the class and many private functions. Public
functions uses those private functions. When I declare the public function as
"SHARED" then I can't access the private function from within public
functions, it says: " ....Cannot refer to an instance member of a class from
within a shared method or shared member initializer without an explicit
instance of the class....."
"Herfried K. Wagner [MVP]" wrote: "patang" <pa****@discussions.microsoft.com> schrieb: When I create my own class, to use the functions of that class I have to create an object of that class and then I can access the functions of that class,
for example:
dim obj1 as myclass obj1 = new myclass obj1.myfunction("parameter")
However, when I use .net class e.g. strings I do not need to create a object, I can directly use it?
e.g.
x = strings.left("abc",2)
What do I have to do, so that the functions of my class can also be accessed in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
"Public Shared Function Left(ByVal str As String, ByVal Length As Integer)
As String
Member of Microsoft.VisualBasic.Strings"
- Microsoft documentation.
But there more classes with a method called 'Left'. And they can all do
other things. Check out the specific class for more info. Does this mean that LEFT or RIGHT functions (methods) are declared as SHARED in the STRINGS class ? "Herfried K. Wagner [MVP]" wrote:
"patang" <pa****@discussions.microsoft.com> schrieb: > When I create my own class, to use the functions of that class I have > to > create an object of that class and then I can access the functions of > that > class, > > for example: > > dim obj1 as myclass > obj1 = new myclass > obj1.myfunction("parameter") > > However, when I use .net class e.g. strings I do not need to create a > object, I can directly use it? > > e.g. > > x = strings.left("abc",2) > > What do I have to do, so that the functions of my class can also be > accessed > in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
"Public Shared Function Left(ByVal str As String, ByVal Length As Integer)
As String
Member of Microsoft.VisualBasic.Strings"
- Microsoft documentation.
But there more classes with a method called 'Left'. And they can all do
other things. Check out the specific class for more info. Does this mean that LEFT or RIGHT functions (methods) are declared as SHARED in the STRINGS class ? "Herfried K. Wagner [MVP]" wrote:
"patang" <pa****@discussions.microsoft.com> schrieb: > When I create my own class, to use the functions of that class I have > to > create an object of that class and then I can access the functions of > that > class, > > for example: > > dim obj1 as myclass > obj1 = new myclass > obj1.myfunction("parameter") > > However, when I use .net class e.g. strings I do not need to create a > object, I can directly use it? > > e.g. > > x = strings.left("abc",2) > > What do I have to do, so that the functions of my class can also be > accessed > in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
You have to make the 'Private' methods also 'Shared' if you want to use them
inside a 'Public Shared' method, or create an instance of the class inside
the 'Public Shared' instance and use that instance to call the 'Private'
methods.
"patang" <pa****@discussions.microsoft.com> schreef in bericht
news:64**********************************@microsof t.com... I have one public function in the class and many private functions. Public functions uses those private functions. When I declare the public function as "SHARED" then I can't access the private function from within public functions, it says: " ....Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class....."
"Herfried K. Wagner [MVP]" wrote:
"patang" <pa****@discussions.microsoft.com> schrieb: > When I create my own class, to use the functions of that class I have > to > create an object of that class and then I can access the functions of > that > class, > > for example: > > dim obj1 as myclass > obj1 = new myclass > obj1.myfunction("parameter") > > However, when I use .net class e.g. strings I do not need to create a > object, I can directly use it? > > e.g. > > x = strings.left("abc",2) > > What do I have to do, so that the functions of my class can also be > accessed > in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
You have to make the 'Private' methods also 'Shared' if you want to use them
inside a 'Public Shared' method, or create an instance of the class inside
the 'Public Shared' instance and use that instance to call the 'Private'
methods.
"patang" <pa****@discussions.microsoft.com> schreef in bericht
news:64**********************************@microsof t.com... I have one public function in the class and many private functions. Public functions uses those private functions. When I declare the public function as "SHARED" then I can't access the private function from within public functions, it says: " ....Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class....."
"Herfried K. Wagner [MVP]" wrote:
"patang" <pa****@discussions.microsoft.com> schrieb: > When I create my own class, to use the functions of that class I have > to > create an object of that class and then I can access the functions of > that > class, > > for example: > > dim obj1 as myclass > obj1 = new myclass > obj1.myfunction("parameter") > > However, when I use .net class e.g. strings I do not need to create a > object, I can directly use it? > > e.g. > > x = strings.left("abc",2) > > What do I have to do, so that the functions of my class can also be > accessed > in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
one more question:
In my solution only following are imported:
System
System.Data
System.Drawings
System.Windows.Form
System.XML
System.Data.Oledb
How come the methods of Strings class are accessible even though it has not
been imported in my solution?
"Qwert" wrote: You have to make the 'Private' methods also 'Shared' if you want to use them inside a 'Public Shared' method, or create an instance of the class inside the 'Public Shared' instance and use that instance to call the 'Private' methods.
"patang" <pa****@discussions.microsoft.com> schreef in bericht news:64**********************************@microsof t.com...I have one public function in the class and many private functions. Public functions uses those private functions. When I declare the public function as "SHARED" then I can't access the private function from within public functions, it says: " ....Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class....."
"Herfried K. Wagner [MVP]" wrote:
"patang" <pa****@discussions.microsoft.com> schrieb: > When I create my own class, to use the functions of that class I have > to > create an object of that class and then I can access the functions of > that > class, > > for example: > > dim obj1 as myclass > obj1 = new myclass > obj1.myfunction("parameter") > > However, when I use .net class e.g. strings I do not need to create a > object, I can directly use it? > > e.g. > > x = strings.left("abc",2) > > What do I have to do, so that the functions of my class can also be > accessed > in the same fashion..
There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
I'm guessing because you have "Microsoft.VisualBasic" in your import
statements of your project.
Right click on your project's name in the solution explorer and click on
properties. Select Common Properties -> Imports. There is a list with
Project Imports.
"patang" <pa****@discussions.microsoft.com> schreef in bericht
news:9E**********************************@microsof t.com... one more question:
In my solution only following are imported:
System System.Data System.Drawings System.Windows.Form System.XML
System.Data.Oledb
How come the methods of Strings class are accessible even though it has not been imported in my solution? "Qwert" wrote:
You have to make the 'Private' methods also 'Shared' if you want to use them inside a 'Public Shared' method, or create an instance of the class inside the 'Public Shared' instance and use that instance to call the 'Private' methods.
"patang" <pa****@discussions.microsoft.com> schreef in bericht news:64**********************************@microsof t.com... >I have one public function in the class and many private functions. >Public > functions uses those private functions. When I declare the public > function > as > "SHARED" then I can't access the private function from within public > functions, it says: " ....Cannot refer to an instance member of a class > from > within a shared method or shared member initializer without an explicit > instance of the class....." > > > > "Herfried K. Wagner [MVP]" wrote: > >> "patang" <pa****@discussions.microsoft.com> schrieb: >> > When I create my own class, to use the functions of that class I >> > have >> > to >> > create an object of that class and then I can access the functions >> > of >> > that >> > class, >> > >> > for example: >> > >> > dim obj1 as myclass >> > obj1 = new myclass >> > obj1.myfunction("parameter") >> > >> > However, when I use .net class e.g. strings I do not need to create >> > a >> > object, I can directly use it? >> > >> > e.g. >> > >> > x = strings.left("abc",2) >> > >> > What do I have to do, so that the functions of my class can also be >> > accessed >> > in the same fashion.. >> >> There are two ways to archieve what you want to do: >> >> * You can add the 'Shared' modifier to your function when >> it's part of a class ('Public Shared Function...'). >> >> * Or you can add the function to a module. 'Shared' is not >> required when doing this. Functions defined in modules >> are imported automatically and thus can be accessed >> with their unqualified name (for example, 'Left' instead of >> 'Strings.Left'). >> >> -- >> M S Herfried K. Wagner >> M V P <URL:http://dotnet.mvps.org/> >> V B <URL:http://classicvb.org/petition/> >> >>
Your are right. "Microsoft.VisualBasic" is included in the list of imports
in my project.
"Qwert" wrote: I'm guessing because you have "Microsoft.VisualBasic" in your import statements of your project.
Right click on your project's name in the solution explorer and click on properties. Select Common Properties -> Imports. There is a list with Project Imports. "patang" <pa****@discussions.microsoft.com> schreef in bericht news:9E**********************************@microsof t.com... one more question:
In my solution only following are imported:
System System.Data System.Drawings System.Windows.Form System.XML
System.Data.Oledb
How come the methods of Strings class are accessible even though it has not been imported in my solution?
"patang" <pa****@discussions.microsoft.com> schrieb: Does this mean that LEFT or RIGHT functions (methods) are declared as SHARED in the STRINGS class ?
These functions are declared in the 'Strings' /module/. Methods declared in
a module are implicitly shared.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
I'm not 100% clear about what you mean... I understand completely about
having a public shared function in a class (I use one in a singleton
pattern class to hold some global variables). However, when I access that
function I need to fully qualify it (ie: myClass.myfunction() ). On your
second point, I'm not quite sure what you mean by adding the function to a
module.
I have a custom control library which I've built into a DLL. It contains
various *.VB files and each VB file has 1 or more classes defined. These
classes have public subs which I can access with the fully qualified name
(myClass.mySub). I do an IMPORT of this library dll wherever I need it.
What I would like to do is create a sub in this library that I can reference
without having to fully qualify it. It doesn't particularly matter if this
sub is in a class or not, I'd just like to be able to say
"myFunction(...)" without qualification (assume the name is unique).
Is there a way to do this?
Thanks, John
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl... There are two ways to archieve what you want to do:
* You can add the 'Shared' modifier to your function when it's part of a class ('Public Shared Function...').
* Or you can add the function to a module. 'Shared' is not required when doing this. Functions defined in modules are imported automatically and thus can be accessed with their unqualified name (for example, 'Left' instead of 'Strings.Left').
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/>
"JohnR" <Jo******@hotmail.com> schrieb: I'm not 100% clear about what you mean... I understand completely about having a public shared function in a class (I use one in a singleton pattern class to hold some global variables). However, when I access that function I need to fully qualify it (ie: myClass.myfunction() ). On your second point, I'm not quite sure what you mean by adding the function to a module.
I have a custom control library which I've built into a DLL. It contains various *.VB files and each VB file has 1 or more classes defined. These classes have public subs which I can access with the fully qualified name (myClass.mySub). I do an IMPORT of this library dll wherever I need it.
What I would like to do is create a sub in this library that I can reference without having to fully qualify it. It doesn't particularly matter if this sub is in a class or not, I'd just like to be able to say "myFunction(...)" without qualification (assume the name is unique).
Is there a way to do this?
Add an additional file to your class library:
\\\
Public Module CommonFunctions
Public Sub DoSomething()
...
End Sub
End Module
///
In the project that uses the DLL import the DLL's root namespace
('ClassLibrary1'). Then you will be able to call 'DoEvents' without
qualification. If you are using a class instead of the module
\\\
Public Class CommonFunctions
Public Shared Sub DoSomething()
...
End Sub
End Class
///
and import the class in the client project that uses the DLL ('Imports
ClassLibrary1.CommonFunctions') you will be able to call 'DoSomething'
without fully qualifying it too.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Herfried,
I was writing as well an answer on the question when I saw yours.
You can for sure interpret my message wrong, therefore this message.
My message about shared and non shared is *not* based on your message. I had
already written it before that I saw yours.
Cor
Herfried,
I readed this while busy for a sample about
"Set Controls dinamically? is this for experts?"
and thought that this was your answer on that, so forget it.
Sorry
Cor
Herfried,
Thank you so much for your response. It worked out very well. The
thing I was missing was not realizing that you could do a:
Imports ClassLibrary.CommonFunctions
I thought you could only import the ClassLibrary itself... You really
cleared it up for me...
Thanks again, John
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl... "JohnR" <Jo******@hotmail.com> schrieb: I'm not 100% clear about what you mean... I understand completely about having a public shared function in a class (I use one in a singleton pattern class to hold some global variables). However, when I access that function I need to fully qualify it (ie: myClass.myfunction() ). On your second point, I'm not quite sure what you mean by adding the function to a module.
I have a custom control library which I've built into a DLL. It contains various *.VB files and each VB file has 1 or more classes defined. These classes have public subs which I can access with the fully qualified name (myClass.mySub). I do an IMPORT of this library dll wherever I need it.
What I would like to do is create a sub in this library that I can reference without having to fully qualify it. It doesn't particularly matter if this sub is in a class or not, I'd just like to be able to say "myFunction(...)" without qualification (assume the name is unique).
Is there a way to do this?
Add an additional file to your class library:
\\\ Public Module CommonFunctions Public Sub DoSomething() ... End Sub End Module ///
In the project that uses the DLL import the DLL's root namespace ('ClassLibrary1'). Then you will be able to call 'DoEvents' without qualification. If you are using a class instead of the module
\\\ Public Class CommonFunctions Public Shared Sub DoSomething() ... End Sub End Class ///
and import the class in the client project that uses the DLL ('Imports ClassLibrary1.CommonFunctions') you will be able to call 'DoSomething' without fully qualifying it too.
-- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fernando Rodriguez |
last post by:
Hi,
I need to traverse the methods defined in a class and its superclasses. This
is the code I'm using:
# An instance of class B should be able to check all the methods defined in B
#and A,...
|
by: John M. Gabriele |
last post by:
I've done some C++ and Java in the past, and have recently learned
a fair amount of Python. One thing I still really don't get though
is the difference between class methods and instance methods. I...
|
by: Oplec |
last post by:
Hi,
I'm learning C++ as a hobby using The C++ Programming Language : Special
Edition by Bjarne Stroustrup. I'm working on chpater 13 exercises that
deal with templates. Exercise 13.9 asks for me...
|
by: Bryan Parkoff |
last post by:
I have created three classes according to my own design. First class
is called CMain. It is the Top Class. Second class and third class are
called CMemory and CMPU. They are the sub-classes....
|
by: Banaticus Bart |
last post by:
I wrote an abstract base class from which I've derived a few other
classes. I'd like to create a base class array where each element is
an instance of a derived object. I can create a base class...
|
by: Bryan Parkoff |
last post by:
I find an interesting issue that one base class has only one copy for
each derived class. It looks like that one base class will be copied into
three base classes while derived class from base...
|
by: Jon Slaughter |
last post by:
I have a class that is basicaly duplicated throughout several files with
only members names changing according to the class name yet with virtually
the exact same coding going on.
e.g.
class...
|
by: Andy |
last post by:
Hi all,
I have a site with the following architecture:
Common.Web.dll - Contains a CommonPageBase class which inherits
System.Web.UI.Page
myadd.dll - Contains PageBase which inherits...
|
by: Hamilton Woods |
last post by:
Diehards,
I developed a template matrix class back around 1992 using Borland C++ 4.5
(ancestor of C++ Builder) and haven't touched it until a few days ago. I
pulled it from the freezer and...
|
by: emin.shopper |
last post by:
I had a need recently to check if my subclasses properly implemented
the desired interface and wished that I could use something like an
abstract base class in python. After reading up on metaclass...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |