Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
public string GetBusinessIndicatorsList()
        {
            BusinessIndicartors indicators = null;
            WorkOrderContext Context = new WorkOrderContext();

            indicators = BusniessIndicatorsContext.GetBusinessIndicatorsList();

            // Convert class object to JSON String
            return new JavaScriptSerializer().Serialize(indicators);
        }



getting the above mentioned error

an object reference is required for the non static field method or property?

can any tell me how to solve?
Posted
Updated 20-May-15 23:23pm
v2
Comments
Richard MacCutchan 21-May-15 5:51am    
Yes, use an object reference for the method (which one of the above) in question. If you do not understand how to use class objects then you should go back to your C# reference documentation.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900