15,665,942 members
See more:

Build arrays A & B,
like Array A={1,2,3,4}
and Array B={5,6,3,2}
add these two array in Array C
and sort the array display elements in descending order.

Regards
Basheer
Posted
Updated 11-Apr-11 22:27pm
v2
Pong D. Panda 12-Apr-11 2:20am
You need to further elaborate your question. Give us a sample answer on your given A and B inputs
Sandeep Mewara 12-Apr-11 8:35am
No effort.
BobJanova 12-Apr-11 8:46am
Did you just copy the question off your homework and post it here without even reading it? Come on, use a bit of effort.

## Solution 1

There are two ways to do this: One way includes the duplicates in the result, the other doesn't.
Easy way:
```int[] A = new int[] { 1, 2, 3, 4 };
int[] B = new int[] { 5, 6, 3, 2 };
List<int> combined = new List<int>();
combined.Sort();
int[] C = combined.ToArray();</int></int>
```

Harder way:
```int[] A = new int[] { 1, 2, 3, 4 };
int[] B = new int[] { 5, 6, 3, 2 };
List<int> combined = new List<int>();
foreach (int i in B)
{
if (!combined.Contains(i))
{
}
}
combined.Sort();
int[] C = combined.ToArray();</int></int>
```

Basheer Belgod 13-Apr-11 0:33am
I got it
Thank you so much

From
Basheer