It's not recommended, but you can do it like this:
public class MyGlobalData {
public static int MyGlobalInt1 = 10;
public static string MyGlobalString1 = "SomeString";
}
.
MyGlobalData.MyGlobalInt1 = 100;
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
Thread-Topic: where do I put global data?
thread-index: AcT477IVkkulTkb+TKqIe30dtxFV4A==
X-WBNR-Posting-Host: 143.115.159.56
From: "=?Utf-8?B?YnJpZm9yZ2U=?=" <
[email protected]>
Subject: where do I put global data?
Date: Wed, 12 Jan 2005 13:43:04 -0800
Lines: 4
Message-ID: <
[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.framework.compactframework
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA0
3.phx.gbl
Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:68517
X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
I'm working on my first C# .NET app for PPC, coming from Palm development
with c++. So far I've got a simple app with a couple forms. I want
to
store
data in a class I've created which is accessible from all the
different
forms. In C++ I did that with global variables. How do I do that in
C#.NET?