Click here to Skip to main content
15,891,253 members
Home / Discussions / C#
   

C#

 
GeneralRe: Convert Word doc to Byte Pin
Luc Pattyn23-Nov-10 10:34
sitebuilderLuc Pattyn23-Nov-10 10:34 
AnswerRe: Convert Word doc to Byte Pin
NickHighIQ23-Nov-10 13:51
NickHighIQ23-Nov-10 13:51 
GeneralRe: Convert Word doc to Byte Pin
Luc Pattyn23-Nov-10 14:41
sitebuilderLuc Pattyn23-Nov-10 14:41 
GeneralRe: Convert Word doc to Byte Pin
NickHighIQ23-Nov-10 15:53
NickHighIQ23-Nov-10 15:53 
GeneralRe: Convert Word doc to Byte Pin
Pete O'Hanlon23-Nov-10 23:13
mvePete O'Hanlon23-Nov-10 23:13 
GeneralRe: Convert Word doc to Byte Pin
NickHighIQ24-Nov-10 1:10
NickHighIQ24-Nov-10 1:10 
GeneralRe: Convert Word doc to Byte Pin
Luc Pattyn24-Nov-10 3:42
sitebuilderLuc Pattyn24-Nov-10 3:42 
GeneralRe: Convert Word doc to Byte Pin
MWRivera24-Nov-10 4:59
MWRivera24-Nov-10 4:59 
Hi Nick,

I really appreciate your feedback. I have to agree with you, I have no doubt in thinking Luc is probably one of the most knowledgeable in these forums but from my experience he has been very unhelpful and I did take his feedback as being a little rude.

I refreshed on Base64 and found the following very helpful:
http://www.aardwulf.com/tutor/base64/base64.pdf


Here is an explanation of the process I’m trying to achieve…
I’m using a class library named SmtPop to allow the retrieval of email from a Pop3 server.
1. After the emails are retrieved from the server I check if they have attachments. attach is of type MimeAttachment
2. If an email has an attachment then the text within the attachment is accessed through attach.Body.
3. I then want to create a file to save the email attachment text into and give the file a different name to its original.

The only reason I’m converting the body of the attachment to a Byte array using Convert.FromBase64String, is because MemoryStream takes in a byte array as its first parameter in order to create a memory stream that can then be written to the file. FromBase64String is the only convert method that I know of that returns a Byte array.

Maybe there is an alternative way to the MemoryStream that doesn’t involve converting the attachment string to a Byte array?

Let me know if any of this isn’t clear.

Thanks again,
Mel
GeneralRe: Convert Word doc to Byte Pin
MWRivera24-Nov-10 5:01
MWRivera24-Nov-10 5:01 
GeneralRe: Convert Word doc to Byte Pin
MWRivera30-Nov-10 5:05
MWRivera30-Nov-10 5:05 
QuestionGeneric Event In Interface Pin
Kevin Marois23-Nov-10 6:10
professionalKevin Marois23-Nov-10 6:10 
AnswerRe: Generic Event In Interface Pin
Keith Barrow23-Nov-10 6:25
professionalKeith Barrow23-Nov-10 6:25 
QuestionProgrammatically checking DataGridViewCheckBoxCell Pin
kapax523-Nov-10 4:34
kapax523-Nov-10 4:34 
AnswerRe: Programmatically checking DataGridViewCheckBoxCell Pin
Dave Kreskowiak23-Nov-10 6:25
mveDave Kreskowiak23-Nov-10 6:25 
Questionhow to return? Pin
Jassim Rahma23-Nov-10 4:12
Jassim Rahma23-Nov-10 4:12 
AnswerStill not a C# question Pin
Pete O'Hanlon23-Nov-10 4:22
mvePete O'Hanlon23-Nov-10 4:22 
AnswerRe: how to return? Pin
Dave Kreskowiak23-Nov-10 4:30
mveDave Kreskowiak23-Nov-10 4:30 
AnswerRe: how to return? Pin
Keith Barrow23-Nov-10 6:28
professionalKeith Barrow23-Nov-10 6:28 
AnswerRe: how to return? Pin
Smithers-Jones23-Nov-10 6:40
Smithers-Jones23-Nov-10 6:40 
Questionhow to output this from mysql? Pin
Jassim Rahma23-Nov-10 4:10
Jassim Rahma23-Nov-10 4:10 
AnswerRe: how to output this from mysql? Pin
Not Active23-Nov-10 4:14
mentorNot Active23-Nov-10 4:14 
AnswerRe: how to output this from mysql? [modified] Pin
fjdiewornncalwe23-Nov-10 4:15
professionalfjdiewornncalwe23-Nov-10 4:15 
QuestionAppointment alerts - server or pc Pin
Jassim Rahma23-Nov-10 3:56
Jassim Rahma23-Nov-10 3:56 
AnswerRe: Appointment alerts - server or pc Pin
Dave Kreskowiak23-Nov-10 4:28
mveDave Kreskowiak23-Nov-10 4:28 
GeneralRe: Appointment alerts - server or pc Pin
Jassim Rahma24-Nov-10 3:04
Jassim Rahma24-Nov-10 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.