I have a class like this and I cannot change and only have to use it. this class defines an Implicitly-typed array such a list that in each row we have an index and a data(as producer says):
public partial class LightPenMeta {
private long lightPenIDField;
private byte[] lightPenDataField;
/// <remarks/>
public long LightPenID {
get {
return this.lightPenIDField;
}
set {
this.lightPenIDField = value;
}
}
/// <remarks/>
[System.Xml.Serialization.XmlElementAttribute(DataType="base64Binary")]
public byte[] LightPenData {
get {
return this.lightPenDataField;
}
set {
this.lightPenDataField = value;
}
}
}
my problem is I have to use it and define an array type of LightPenMeta[] which contains for example LightPenID=0 ,LightPenData= '' in row 0.
this code returns null exception:
var lp = new LightPenMeta[1];
lp[0].LightPenData = Data;
lp[0].LightPenID = 0;
the question is how can I use this class and fill it's row?