Click here to Skip to main content
15,884,629 members
Home / Discussions / C#
   

C#

 
AnswerRe: A Question Of Structure Pin
BobJanova11-Apr-12 23:57
BobJanova11-Apr-12 23:57 
QuestionConverting special string array into two different byte arrays Pin
MichCl11-Apr-12 8:22
MichCl11-Apr-12 8:22 
AnswerRe: Converting special string array into two different byte arrays Pin
PIEBALDconsult11-Apr-12 9:41
mvePIEBALDconsult11-Apr-12 9:41 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl11-Apr-12 10:11
MichCl11-Apr-12 10:11 
AnswerRe: Converting special string array into two different byte arrays Pin
OriginalGriff11-Apr-12 9:50
mveOriginalGriff11-Apr-12 9:50 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl12-Apr-12 5:00
MichCl12-Apr-12 5:00 
GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff12-Apr-12 5:56
mveOriginalGriff12-Apr-12 5:56 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 7:42
MichCl17-Apr-12 7:42 
What about if I'm going in the opposite direction? I want to take a string or byte array and each value which is shown in decimal, I want to convert to hex notation? wBuf is a byte[]. I tried this, but it's complaining:

C#
int i = 0;
string[] values = new string[wBuf.Length];

foreach (byte value in wBuf)
{
   string temp = wBuf[0].ToString();
   values[i] = (temp, (System.Globalization.NumberStyles.HexNumber));
   i++;
}

says "cannot convert lambda expression to type string because it is not delegate type".

I also tried:

C#
foreach (byte value in wBuf)
{
    values[i] = (byte.Parse(wBuf[i], (System.Globalization.NumberStyles.HexNumber)));
    i++;
}


but it says "the best overloaded method match for 'byte.parse(string, system.iformatProvider)' has some invalid arguments".

Any ideas?? Thanks for your help.

modified 17-Apr-12 13:52pm.

GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff17-Apr-12 8:03
mveOriginalGriff17-Apr-12 8:03 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 8:34
MichCl17-Apr-12 8:34 
GeneralRe: Converting special string array into two different byte arrays Pin
OriginalGriff17-Apr-12 8:43
mveOriginalGriff17-Apr-12 8:43 
GeneralRe: Converting special string array into two different byte arrays Pin
MichCl17-Apr-12 9:15
MichCl17-Apr-12 9:15 
Suggestionproject Pin
Apurba Chatterjee11-Apr-12 8:18
Apurba Chatterjee11-Apr-12 8:18 
AnswerRe: project Pin
ZurdoDev11-Apr-12 8:33
professionalZurdoDev11-Apr-12 8:33 
GeneralRe: project Pin
Big Daddy Farang11-Apr-12 9:18
Big Daddy Farang11-Apr-12 9:18 
JokeRe: project Pin
ZurdoDev11-Apr-12 9:19
professionalZurdoDev11-Apr-12 9:19 
JokeRe: project Pin
V.11-Apr-12 21:02
professionalV.11-Apr-12 21:02 
GeneralRe: project Pin
ZurdoDev12-Apr-12 1:47
professionalZurdoDev12-Apr-12 1:47 
GeneralRe: project Pin
RobCroll11-Apr-12 18:52
RobCroll11-Apr-12 18:52 
QuestionExport Mutiple DataGridView to Multiple Sheets in an Excel File ... Pin
nassimnastaran11-Apr-12 8:15
nassimnastaran11-Apr-12 8:15 
QuestionPlease help me on using this codeproject Pin
aquahoya11-Apr-12 6:39
aquahoya11-Apr-12 6:39 
AnswerRe: Please help me on using this codeproject Pin
Richard MacCutchan11-Apr-12 6:55
mveRichard MacCutchan11-Apr-12 6:55 
AnswerRe: Please help me on using this codeproject Pin
Big Daddy Farang11-Apr-12 7:24
Big Daddy Farang11-Apr-12 7:24 
AnswerRe: still having problem =( Pin
aquahoya11-Apr-12 7:46
aquahoya11-Apr-12 7:46 
GeneralRe: still having problem =( Pin
Big Daddy Farang11-Apr-12 9:07
Big Daddy Farang11-Apr-12 9:07 

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.