Does anyone have a good example of how to use this method? All of the MSDN examples I could find are useless because:

  1. they show a hard-coded size for the byte array
  2. they show writing the output to the Console

Ridiculous. I have a file that contains some binary image data (PCL format) that is base64 encoded. I simply need to read that, decode it back to raw binary, and write it out to a file.

All my attempts run, but do not produce usable output.

What about having a look at Convert.ToBase64String and Convert.FromBase64String ?