Link to home
Start Free TrialLog in
Avatar of tmajor99
tmajor99

asked on

C# Copying An Array Class

How do I copy the contents from this array class  (valueconditions) to a new array class (obj.valueCondition)?

 private treeNode[] GetAllSupplierProductsUsingFilter(valueCondition valueconditions)
        {
                queryType obj = new queryType();
               obj.valueCondition = valueconditions;   --> Help?
         }

Here is how they are defined.
        valueCondition valueconditions = new valueCondition();


 public partial class valueCondition : object, System.ComponentModel.INotifyPropertyChanged {
       
        private string attributeURLField;
       
        private string attributeValueField;
       
        [System.Xml.Serialization.XmlElementAttribute(Order=0)]
        public string attributeURL {
            get {
                return this.attributeURLField;
            }
            set {
                this.attributeURLField = value;
                this.RaisePropertyChanged("attributeURL");
            }
        }
       
        [System.Xml.Serialization.XmlElementAttribute(Order=1)]
        public string attributeValue {
            get {
                return this.attributeValueField;
            }
            set {
                this.attributeValueField = value;
                this.RaisePropertyChanged("attributeValue");
            }
        }
Avatar of Bradley Bishop
Bradley Bishop

So you need it to be exactly the same array?

You could try to clone it.

obj.valueCondition = (valueCondition) valueconditions.Clone();
ASKER CERTIFIED SOLUTION
Avatar of Miguel Oz
Miguel Oz
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial