Microsoft
Software
Hardware
Network
Question : C# sharing variables or data between different classes
Hi,
Stumped on this and after days of research in books/online.
Can someone provide example where data/ int is passed and can be used in another class?
Ex. Class1 - would generate data/int
Class2 - would use data/int generated from Class1.
What I'm trying is global variable which is not possible in C#.
I've tried Instance Constructors by using Class2:class1 etc.
Also tried public int x and tried to assign that in Class1 and use the
generate int in Class2.
Found many examples in books/online but none seem to work for
passing data between classes.
Please help.
newbie.
Answer : C# sharing variables or data between different classes
If it is under warranty. The best thing will be to take it to the service center instead of trying to solve it by yourself.
Maybe its a small problem but your half knowledge can turn this into large.
Random Solutions
Update field in table with unbound field on form.
sqlplus insert into select script
Can I use DFS to replicate VM's between two MS Hyper-V Servers?
XP won't load in Normal Run Mode
Differences between full versions and "Click-to-Run" versions of MS Office
Locating next index of a record set and moving to that record after form data is refreshed.
Mixed date/time display in Excel
Clicking a button in another application
Trying to build website with Dreamweaver, however, I have joomla templates
"HTTP Error 404.0 - Not Found" in ASP.Net