473,385 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

VB GlobalMultise Class

Can i have in C# classes that are like VB6 classes GlobalMultiUse?
I have a class with general functions supporting my programming and i don't
wan't to instanciate it in every class that i need to use it.

thanks,
Gonçalo Boléo
Nov 16 '05 #1
3 1375
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.

-Rob Teixeira

"Gonçalo Boléo" <go*****@kaid4.pt> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
Can i have in C# classes that are like VB6 classes GlobalMultiUse?
I have a class with general functions supporting my programming and i don't wan't to instanciate it in every class that i need to use it.

thanks,
Gonçalo Boléo

Nov 16 '05 #2
"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.


It can be a good idea to mark the constructor of this class as private.

Michael
Nov 16 '05 #3
Thanks
I think this is what i want

"Rob Teixeira" <RobTeixeira@@msn.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Mark the functions with the "static" keyword.
To call them, use ClassName.FunctionName
No instance required. Technically, this is a little different from
GlobalMultiUse since COM requires instances and under the covers it's not
quite the same, but the end effect is what you're looking for.

-Rob Teixeira

"Gonçalo Boléo" <go*****@kaid4.pt> wrote in message
news:Oq**************@tk2msftngp13.phx.gbl...
Can i have in C# classes that are like VB6 classes GlobalMultiUse?
I have a class with general functions supporting my programming and i

don't
wan't to instanciate it in every class that i need to use it.

thanks,
Gonçalo Boléo


Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Murat Tasan | last post by:
hi, i am having a small problem with constructing an inner class. i am using an inner class (and not a static nested class) because the methods of the inner class need access to the enclosing...
2
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,...
2
by: Gabriel Genellina | last post by:
Hi In the following code sample, I have: - a Worker class, which could have a lot of methods and attributes. In particular, it has a 'bar' attribute. This class can be modified as needed. - a...
3
by: Robert | last post by:
Python doesn't know the class of a method when container not direct class attribute: >>> class X: .... def f():pass .... g=f .... l= .... >>> X.g <unbound method X.f>
1
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...
9
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...
5
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...
3
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...
0
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.