Click here to Skip to main content
15,914,386 members
Home / Discussions / C#
   

C#

 
GeneralRe: passing textbox values to an array Pin
Radgar26-Feb-05 10:42
Radgar26-Feb-05 10:42 
GeneralRe: passing textbox values to an array Pin
la vie26-Feb-05 14:58
la vie26-Feb-05 14:58 
GeneralRe: passing textbox values to an array Pin
Radgar26-Feb-05 16:13
Radgar26-Feb-05 16:13 
QuestionHow to get the value from keyboard? Pin
Johny Ng25-Feb-05 14:38
Johny Ng25-Feb-05 14:38 
AnswerRe: How to get the value from keyboard? Pin
S. Senthil Kumar25-Feb-05 15:07
S. Senthil Kumar25-Feb-05 15:07 
AnswerRe: How to get the value from keyboard? Pin
sardonicus26-Feb-05 12:37
sardonicus26-Feb-05 12:37 
Questionhow to convert a float array (float[]) to a byte array Pin
xuguoqing25-Feb-05 14:00
xuguoqing25-Feb-05 14:00 
AnswerRe: how to convert a float array (float[]) to a byte array Pin
S. Senthil Kumar25-Feb-05 15:02
S. Senthil Kumar25-Feb-05 15:02 
The BitConverter class does the job. You can do somthing like
<br />
byte[] GetByteArray(float []f)<br />
{<br />
   byte[] byteArray = new byte[f.Length * 4]; //Each float gets converted to 4 bytes<br />
   int index = 0;<br />
   foreach(float floatVal in f)<br />
   {<br />
       byte []convertedBytes = BitConverter.GetBytes(f);<br />
       byteArray[index++] = convertedBytes[0];<br />
       byteArray[index++] = convertedBytes[1];<br />
       byteArray[index++] = convertedBytes[2];<br />
       byteArray[index++] = convertedBytes[3];<br />
   }<br />
<br />
   return byteArray;<br />
}<br />


Does this help?

Regards
Senthil
My Blog
GeneralRetrieve code of method at runtime Pin
hahoyer25-Feb-05 11:53
hahoyer25-Feb-05 11:53 
GeneralRe: Retrieve code of method at runtime Pin
S. Senthil Kumar25-Feb-05 15:07
S. Senthil Kumar25-Feb-05 15:07 
GeneralRe: Retrieve code of method at runtime Pin
sreejith ss nair26-Feb-05 1:27
sreejith ss nair26-Feb-05 1:27 
GeneralRe: Retrieve code of method at runtime Pin
Dave Kreskowiak26-Feb-05 4:14
mveDave Kreskowiak26-Feb-05 4:14 
GeneralRe: Retrieve code of method at runtime Pin
sreejith ss nair26-Feb-05 20:08
sreejith ss nair26-Feb-05 20:08 
GeneralRe: Retrieve code of method at runtime Pin
hahoyer26-Feb-05 15:15
hahoyer26-Feb-05 15:15 
GeneralRe: Retrieve code of method at runtime Pin
S. Senthil Kumar26-Feb-05 19:41
S. Senthil Kumar26-Feb-05 19:41 
GeneralSome kind of file encryption thingy!! Pin
Anthony Mushrow25-Feb-05 11:49
professionalAnthony Mushrow25-Feb-05 11:49 
GeneralRe: Some kind of file encryption thingy!! Pin
Colin Angus Mackay25-Feb-05 11:51
Colin Angus Mackay25-Feb-05 11:51 
GeneralRe: Some kind of file encryption thingy!! Pin
Anthony Mushrow25-Feb-05 12:22
professionalAnthony Mushrow25-Feb-05 12:22 
GeneralRe: Some kind of file encryption thingy!! Pin
mav.northwind26-Feb-05 0:41
mav.northwind26-Feb-05 0:41 
GeneralProblem Get Attribute Returning Null. Pin
DemonBob25-Feb-05 11:19
DemonBob25-Feb-05 11:19 
GeneralRe: Problem Get Attribute Returning Null. Pin
Colin Angus Mackay25-Feb-05 11:49
Colin Angus Mackay25-Feb-05 11:49 
GeneralRe: Problem Get Attribute Returning Null. Pin
DemonBob25-Feb-05 15:16
DemonBob25-Feb-05 15:16 
GeneralEncrypting and Decrypting a file Pin
Peter Nirschl25-Feb-05 9:27
Peter Nirschl25-Feb-05 9:27 
GeneralRe: Encrypting and Decrypting a file Pin
Rei Miyasaka25-Feb-05 11:46
Rei Miyasaka25-Feb-05 11:46 
GeneralRe: Encrypting and Decrypting a file Pin
Peter Nirschl25-Feb-05 22:09
Peter Nirschl25-Feb-05 22:09 

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.