The problem occurs when creating a new list in cobol. The list defintiion is in a c# dll. Whenever the list is instantiated in code we get the following error: System.ArgumentNullException: "Key cannot be null. Arg_ParamName_Name"
The program compiles and can be started but when the line is reached, the error occurs. When setting a breakpoint the error doesn't occur but then a second error occurs. Inside of the object the list is created of we get a NullReference VARIABLENAME not set to an instance of an object. The variable is of type string and is initialized with an empty string in the constructor. The variable is private and can only be accessed over an property which does a null check as well.
Object declaration:
private string _VALUETYPE= "";
private string _VALUE = "";
private string _VALUE_EXTENSION = "";
public string VALUETYPE
{
get { return _VALUETYPE; }
set { _VALUETYPE = value; }
}
public string VALUE
{
get { return _VALUE; }
set { _VALUE = value; }
}
public string VALUE_EXTENSION
{
get { return _VALUE_EXTENSION; }
set
{
_VALUE_EXTENSION = value;
}
}
List declaration (constructor):
private readonly List<Systemtabelle> systemtabelle;
public SOList() {
this.systemtabelle = new List<Systemtabelle>();
Add(new Systemtabelle());
}
List intatiation:
declare soList = new type PlainModelLibrary.Implementation.SOList()
Any idea will be welcome.
#.net
#C
#VisualCOBOL
#c