Advertisement

07.26.2004 at 08:23AM PDT, ID: 21071415
[x]
Attachment Details

How do I declare Global Variables?

Asked by ssteeves in C# Programming Language

Tags: global, variable, declare

Hi,

This is my very first C# program.  Previously, I programmed in VB.NET.  In VB.NET, I added a module to my project, and declared my Global variables there, like this:

Module Variables
  Public Response As String = "Hello World"
End Module

Now, however, I see C# does not use Modules.  How would I delcare my variables in C#, so that
they can be used in any of my forms?  

Would I use a Class for this?  Can somebody please give me a little walkthru on using a Global Variable?

Thanks!

ssteevesStart Free Trial
[+][-]07.26.2004 at 08:29AM PDT, ID: 11638336

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C# Programming Language
Tags: global, variable, declare
Sign Up Now!
Solution Provided By: gregoryyoung
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.26.2004 at 09:04AM PDT, ID: 11638693

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.22.2004 at 11:35PM PDT, ID: 11867624

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.23.2004 at 07:47AM PDT, ID: 11870829

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.24.2004 at 07:58PM PDT, ID: 11888861

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2004 at 07:34AM PDT, ID: 11892813

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2004 at 07:39AM PDT, ID: 11892889

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2004 at 09:04AM PDT, ID: 11894104

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2004 at 11:11AM PDT, ID: 11895547

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.25.2004 at 11:58AM PDT, ID: 11895990

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32