Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
GeneralRe: Application behaves differently when running in VS2005 and direct from exe file Pin
Simon P Stevens11-Dec-08 1:38
Simon P Stevens11-Dec-08 1:38 
GeneralRe: Application behaves differently when running in VS2005 and direct from exe file Pin
Pr@teek B@h!11-Dec-08 4:33
Pr@teek B@h!11-Dec-08 4:33 
QuestionMail delivery failed Using SMTP Pin
bhargavichow10-Dec-08 22:38
bhargavichow10-Dec-08 22:38 
AnswerRe: Mail delivery failed Using SMTP Pin
Ashfield11-Dec-08 1:12
Ashfield11-Dec-08 1:12 
QuestionRole of ports in sockets Pin
adhikarihemant10-Dec-08 22:23
adhikarihemant10-Dec-08 22:23 
AnswerRe: Role of ports in sockets Pin
Colin Angus Mackay11-Dec-08 1:50
Colin Angus Mackay11-Dec-08 1:50 
AnswerRe: Role of ports in sockets Pin
Pr@teek B@h!11-Dec-08 4:38
Pr@teek B@h!11-Dec-08 4:38 
QuestionDatagridview VirtualMode property Pin
CNU10-Dec-08 22:13
CNU10-Dec-08 22:13 
Questioninsert update delete in using datagridview (windows aplication using c#) Pin
kulandaivel_mca200710-Dec-08 21:45
kulandaivel_mca200710-Dec-08 21:45 
AnswerRe: insert update delete in using datagridview (windows aplication using c#) Pin
Brij10-Dec-08 22:00
mentorBrij10-Dec-08 22:00 
Questionwhat is the event to unfold the datetime picker Pin
prasadbuddhika10-Dec-08 21:11
prasadbuddhika10-Dec-08 21:11 
GeneralNot full answer - Does anyone else know what window message is needed? Pin
Simon P Stevens11-Dec-08 0:14
Simon P Stevens11-Dec-08 0:14 
AnswerRe: what is the event to unfold the datetime picker Pin
dan!sh 11-Dec-08 2:54
professional dan!sh 11-Dec-08 2:54 
QuestionMSWord.Olb Pin
Laji5910-Dec-08 20:35
Laji5910-Dec-08 20:35 
AnswerRe: MSWord.Olb Pin
Christian Graus10-Dec-08 21:00
protectorChristian Graus10-Dec-08 21:00 
QuestionByte Conversion Pin
Agweet10-Dec-08 20:30
Agweet10-Dec-08 20:30 
Hi all,

im having a problem with retrieving a binary file from the database and reading it in my code, so far i have this:

byte AttachmentByte = new byte();
AttachmentByte = StringToByteArray(inputString);

and a function to convert it:

public static byte[] StringToByteArray(string inputString)
{
System.Text.ASCIIEncoding encoding = new System.Text.ASCIIEncoding();
return encoding.GetBytes(inputString);
}

but when i run it i get the error:

Cannot implicitly convert type 'byte[]' to 'byte'

can someone please tell me what im doing wrong.

thanks in advance!

living life on the flip side

AnswerRe: Byte Conversion Pin
Giorgi Dalakishvili10-Dec-08 20:37
mentorGiorgi Dalakishvili10-Dec-08 20:37 
AnswerRe: Byte Conversion Pin
N a v a n e e t h10-Dec-08 20:44
N a v a n e e t h10-Dec-08 20:44 
GeneralRe: Byte Conversion Pin
Agweet10-Dec-08 20:59
Agweet10-Dec-08 20:59 
GeneralRe: Byte Conversion Pin
N a v a n e e t h10-Dec-08 21:05
N a v a n e e t h10-Dec-08 21:05 
GeneralRe: Byte Conversion Pin
Agweet10-Dec-08 21:10
Agweet10-Dec-08 21:10 
GeneralRe: Byte Conversion Pin
Giorgi Dalakishvili10-Dec-08 21:09
mentorGiorgi Dalakishvili10-Dec-08 21:09 
GeneralRe: Byte Conversion Pin
Agweet10-Dec-08 21:13
Agweet10-Dec-08 21:13 
GeneralRe: Byte Conversion Pin
Giorgi Dalakishvili10-Dec-08 21:18
mentorGiorgi Dalakishvili10-Dec-08 21:18 
GeneralRe: Byte Conversion Pin
Agweet10-Dec-08 21:23
Agweet10-Dec-08 21:23 

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.