Object reference not set to an instance of an object. - CSV synch simulation fails

Hi All

While simulating the CSV synchronization project I get the following error:

Object reference not set to an instance of an object.

How to remedy this issue?

Parents
  • In a nutshell it means.. You are trying to access an object without instantiating it.. You might need to use the "new" keyword to instantiate it first i.e create an instance of it from class.

    public class MyClass
    {
    public int Id {get; set;}
    }
    
    MyClass myClass;
    
    myClass.Id = 0; //error comes here

    You will have to use:

    myClass = new MyClass();
    myClass.Id = 0;

Reply
  • In a nutshell it means.. You are trying to access an object without instantiating it.. You might need to use the "new" keyword to instantiate it first i.e create an instance of it from class.

    public class MyClass
    {
    public int Id {get; set;}
    }
    
    MyClass myClass;
    
    myClass.Id = 0; //error comes here

    You will have to use:

    myClass = new MyClass();
    myClass.Id = 0;

Children
No Data