I have a code residing on server which contain 5 attribute values assigned from an array which shown as below,but the client machine may or may not contain 5 attribute values if it is installed by old version(5th one is new one “string version”)
now i have one requirement “The code needs to check to make sure that the fifth attribute exis.If there are not five entries in the array, the version should be set to a value like “0.0.0.0“
string Name = this_event.Data[0].lower_value;
string no = this_event.Data[1].lower_value;
string debitvalue = this_event.Data[2].lower_value;
string creditvalue = this_event.Data[3].lower_value;
string version = this_event.Data[4].lower_value;//we have to check here whether this attribute exists in client
In order to get the element count in an array you can use the Length property.