Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
static variable related
March 15, 2011
i have a C# class in .net 2.0 in which i wants to use the variable(static int) whose values is set in one method which is static and that variable is used in another static method. the value of that variable changes according to some condition. that variable must have only two values 0,1 from if else for true and false.
i have declare a static int type variable in that class which is global and both methods can use that.
but i got an exception 'object is not reference to object'.
also value once assign will not change in future assignment.
Posted Date: March 15, 2011 Points: 20
Can you put your code as well it will help to resolve the problem.
Hope this helps.
Thanks & Regards,
Posted Date: March 16, 2011 Points: 20
thanks for ur reply
i found the solution of this problem
Logic Lab technologies
To post reply
Related Questions Related Questions
what is difference between static variable and application variable?
related to gridview
What is use of static constructor in real time
Doing Static Analysis, Profiling etc. with VSTS 2008 Dev. Edn.
Session Variable Value in a table property
displaying related words from db
Difference between Dataset & XML Related to C#.net
Table Variable Vs Temportary Table in Sql Server.
Suggestion for forum issues related in dotnetspark
What is runtime static polymorphism and dynamic polymorphism?
Latest Forum Questions From The Same Category
How to display the text in the second ck editor with strikes while extracting from database
Mail is working but I want send two excel file to each different person
how to display child nodes with headers and keeping the child nodes in a table
In DataGrid I have Two Dropdownlist, One in Header template and Item Template
Display data directly from database table to PDF using stored procedures in asp.net C#
How to install and use Dev Express ?
Dialogbox Custom Control
Custom Control in Winforms
I just started learning c#.net console application
How to read csv file which have many special character and tabs?
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend