I have a array type something like this
ZData and this array has a field called "field1"
I am trying to declare something like
ZData data1= new Zdata[]{}
data1[0].field1="12345"
The above code throws me a index out of bounds exception error but it builds successfully
This is a predefined array with only one field and I have to pass this array to an method
[System.Runtime.Serialization.DataContractAttribute(Name="ZData", Namespace="http://schemas.datacontract.org/2004/07/csservice.data")]
[System.SerializableAttribute()]
public partial class ZData : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged {
[System.NonSerializedAttribute()]
private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
private string Field1Field;
[global::System.ComponentModel.BrowsableAttribute(false)]
public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
get {
return this.extensionDataField;
}
set {
this.extensionDataField = value;
}
}
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true)]
public string Field1 {
get {
return this.Field1Field;
}
set {
if ((object.ReferenceEquals(this.Field1Field, value) != true)) {
this.Field1Field = value;
this.RaisePropertyChanged("Field1Field");
}
}
}