0

I have a List string datamember in a class in web service:

[DataContract]
public class ServiceOrder
{
   List<string> blList= new List<string>();
   [DataMember]
   public List<string> AuditStatus 
   {
        get { return blList; }
        set { blList = value; } 
   } 
}

I want to assign values or add values to that list in client code I am getting error:

ServiceOrder so = new ServiceOrder();
so.AuditStatus[0] = "Test";

Object reference not set to an instance of an object I searched and tried many suggestions but nothing solved this issue, please help me solve this. Thanks

imsome1
  • 1,174
  • 2
  • 22
  • 35

0 Answers0