>> >>public bool ActivateAntenna1 = true; >>public bool ActivateAntenna2 = false; >>public bool ActivateAntenna3 = true; >>public bool ActivateAntenna4 = false; >> >>I need an int[] that looks like this in this case: >>this.reader.Attributes.SetANTS(new int[] { 1, 3 } ); >> > >I would probably do something like: > ><pre> >List<int> list = new List<int>(); >if (ActivateAntenna1) > list.Add(1); >if (ActivateAntenna2) > list.Add(2); > >this.reader.Attributes.SetANTS(list.ToArray()); >Thanks Paul,
this.reader.Attributes.SetANTS(new int[] { 1, 3, } ); Notice the trailing comma after the three.Tim