473,385 Members | 1,356 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.

Global classes

How would you make a class global to your entire application?

In C++ you could use "extern" to make a variable declare somewhere else
accessible from somewhere else.

Thanks
Nov 16 '05 #1
2 1470
dd
test
"Relaxin" <me@yourhouse.com> ¦b¶l¥ó
news:O6**************@TK2MSFTNGP10.phx.gbl ¤¤¼¶¼g...
How would you make a class global to your entire application?

In C++ you could use "extern" to make a variable declare somewhere else
accessible from somewhere else.

Thanks

Nov 16 '05 #2
On Sat, 11 Sep 2004 05:55:35 -0700, "Relaxin" <me@yourhouse.com>
wrote:
How would you make a class global to your entire application?

To make a type visible, give it an access modifier of public.
In C++ you could use "extern" to make a variable declare somewhere else
accessible from somewhere else.


The closest would be to mark a C# field as public and static.

--
Scott
http://www.OdeToCode.com
Nov 16 '05 #3

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

Similar topics

10
by: Matt | last post by:
Greetings, What are people's thoughts on global variables in C++? Why are we taught not to use them in programming? Is it true that if you are running two copies of the C program one copy can...
8
by: Jan-Henrik Grobe | last post by:
Hallo, normally I am not the one who calls a Newsgroup if something does not work. But now I am frustrated. I did write a program with a lot classes. I use some gloabl variables which are in a...
4
by: Simon Harris | last post by:
Hi All, I'm new to ASP.Net, so be gentle! (Plenty of 'classic' ASP experience), just one question... - Am I correct in thinking that global functions are stored in ASCX files? Thanks! ...
22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
14
by: Alan Silver | last post by:
Hello, I have spent ages trawling through Google, looking for information about global functions in ASP.NET and I'm still not clear about the best way to go about this (or not). I am writing...
10
by: Ronnie | last post by:
I've created a simple web application using VS2005 Beta 2. Basically, I've added a Web Form and a Global.asax file. In my Global.asax, I create a method like: public static void TestGlobal()...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
35
by: Terry Jolly | last post by:
Web Solution Goal: Have a global database connection Why: (There will be 30+ tables, represented by 30+ classes) I only want to reference the database connection once. I put the connection...
4
by: Sheldon | last post by:
Hi, I have a series of classes that are all within the same file. Each is called at different times by the main script. Now I have discovered that I need several variables returned to the main...
11
by: Sylvia A. | last post by:
How can I define global classes in web application ? Classes can be set to session variables ? Thanks
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...

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.