Question: [This](https://stackoverflow.com/questions/7288897/how-do-i-convert-byte-array-to-uint32-array) question only vise versa. For now I got this:

```
UInt32[] target;

byte[] decoded = new byte[target.Length * 2];
Buffer.BlockCopy(target, 0, decoded, 0, target.Length);

```

And this doesn't work, I get array filled with `0x00`.

Answer: 
Try this code. It works for me.

```
UInt32[] target = new UInt32[]{1,2,3}; 
  byte[] decoded = new byte[target.Length * sizeof(UInt32)];
  Buffer.BlockCopy(target, 0, decoded, 0, target.Length*sizeof(UInt32));

    foreach(byte b in decoded)     
    {
        Console.WriteLine( b);
    }

```
You need to multiple by `4` to create your `byte` array, since `UInt32` is 4 bytes (32 bit). But use `BitConverter` and fill a list of `byte` and late you can create an array out of it if you need. 

```
UInt32[] target = new UInt32[] { 1, 2, 3 };
byte[] decoded = new byte[target.Length * 4]; //not required now
List<byte> listOfBytes = new List<byte>();
foreach (var item in target)
{
    listOfBytes.AddRange(BitConverter.GetBytes(item));   
}

```

If you need array then:

```
byte[] decoded = listOfBytes.ToArray();

```