.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

static variable related

Posted By: Balwant     Posted Date: March 15, 2011    Points:5   Category :C#
hi
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.

thanks.

Responses
Author: Dhiraj Ranka             
Posted Date: March 15, 2011     Points: 20   

Hi,

Can you put your code as well it will help to resolve the problem.

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com
Author: Balwant             
Posted Date: March 16, 2011     Points: 20   

thanks for ur reply
i found the solution of this problem


Logic Lab technologies
Email:balwant.mnd@gmail.com
Website:www.techlogiclab.com


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend