Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 11th, 2010, 02:42 PM
Friend of Wrox
 
Join Date: Feb 2009
Posts: 194
Thanks: 5
Thanked 3 Times in 3 Posts
Default Encoding

I am working on a project which integrates with an API that requires certain files be base64 encoded for the upload.

I have this code below which works fine:

Code:
var data = Encoding.Default.GetBytes("CSV file here");
var base64Data = Convert.ToBase64String(data);
var finalData = Encoding.Default.GetBytes(base64Data);
but I am wondering if this is the most efficient way to achieve this?
__________________
Follow me on twitter.

Where I work.

Connect with me on LinkedIn

Blog




Similar Threads
Thread Thread Starter Forum Replies Last Post
encoding paarupalli J2EE 0 March 2nd, 2007 04:14 AM
Encoding problem. Neal XML 0 April 4th, 2006 06:49 AM
ENCODING DECODING everest ASP.NET 1.0 and 1.1 Professional 3 October 17th, 2005 01:41 AM
text encoding rahuljain_w .NET Web Services 0 October 6th, 2005 05:26 AM
encoding alihussein3 Javascript How-To 1 October 28th, 2003 05:23 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.