PHP to .NET code port

SimplePaymentSolutions
SimplePaymentSolutions used Ask the Experts™
on
Hiya All,

I am a .NET developer, but very new at PHP... and am running in to a problem.

I am converting an API from PHP to .NET (or rather, an example given in PHP), and need to convert the following php code to .NET so that the output is 100% identical - no differences.

$postfields["customfields"] = base64_encode(serialize(array("Package"=>"Lite", "Additional RAM"=>"None", "Additional Hard Drive Space"=>"None", "Additional IP Address"=>"False")));

As background in case you need it, the example uses CURL to post data to an API. I have successfully converted that portion over to .NET using a WebClient, but cannot get the base64 encoded serialized array to take.

Any help is greatly appreciated!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2011
Commented:
Top Expert 2011

Commented:
C#-Base64 Encoding and Decoding
http://www.vbforums.com/showthread.php?t=287324

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial