int to byte[]

  • Thread starter Thread starter Kimmo Laine
  • Start date Start date
K

Kimmo Laine

Hi,

how can i convert int/long/? to byte[]:

public byte[] GetBytes( int i ) {
// . . .
}

public void Foo() {

byte[] b = GetBytes( 1001 );
// . . .
}


thx

Kimmo Laine
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top