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

C#

 
GeneralRe: Structure converstion to Bytearray Pin
San29-Aug-08 0:40
San29-Aug-08 0:40 
GeneralRe: Structure converstion to Bytearray Pin
lisan_al_ghaib29-Aug-08 1:48
lisan_al_ghaib29-Aug-08 1:48 
GeneralRe: Structure converstion to Bytearray Pin
San29-Aug-08 2:02
San29-Aug-08 2:02 
GeneralRe: Structure converstion to Bytearray Pin
J4amieC29-Aug-08 2:13
J4amieC29-Aug-08 2:13 
GeneralRe: Structure converstion to Bytearray Pin
lisan_al_ghaib29-Aug-08 2:23
lisan_al_ghaib29-Aug-08 2:23 
GeneralRe: Structure converstion to Bytearray Pin
J4amieC29-Aug-08 3:54
J4amieC29-Aug-08 3:54 
GeneralRe: Structure converstion to Bytearray Pin
lisan_al_ghaib29-Aug-08 3:57
lisan_al_ghaib29-Aug-08 3:57 
GeneralRe: Structure converstion to Bytearray Pin
lisan_al_ghaib29-Aug-08 2:20
lisan_al_ghaib29-Aug-08 2:20 
let suppose your have this Class :
class SomeClass
{
  double l; 
  double [] m = new double [10]; //double array
  string s;

  byte [] ToByteArray ()
  {
      List<byte> b = new List<byte> ();    
      b.AddRange (BitConverter.GetBytes (l));
      for (int i = 0; i < m.Length ; i++)
        b.AddRange (BitConverter.GetBytes (m [i]));
      char [] tabc = s.ToCharArray();
      for ( int i = 0 ; i < m.Lenght ; i++)
        b.AddRange (BitConverter.GetBytes (tabc [i]);

      return  b.ToArray();
  }
}
//usage : 
SomeClass c = new SomeClass ();
byte [] b = c.ToByteArray();

GeneralRe: Structure converstion to Bytearray Pin
San1-Sep-08 21:29
San1-Sep-08 21:29 
QuestionColor (Generics List) to Color[] Pin
bobsugar22228-Aug-08 23:29
bobsugar22228-Aug-08 23:29 
AnswerRe: Color (Generics List) to Color[] Pin
pbalaga29-Aug-08 2:02
pbalaga29-Aug-08 2:02 
GeneralRe: Color (Generics List) to Color[] Pin
bobsugar22229-Aug-08 3:36
bobsugar22229-Aug-08 3:36 
QuestionReturning the right side of the string Pin
Brendan Vogt28-Aug-08 23:19
Brendan Vogt28-Aug-08 23:19 
AnswerRe: Returning the right side of the string Pin
Anthony Mushrow28-Aug-08 23:30
professionalAnthony Mushrow28-Aug-08 23:30 
AnswerRe: Returning the right side of the string Pin
Brendan Vogt28-Aug-08 23:33
Brendan Vogt28-Aug-08 23:33 
GeneralRe: Returning the right side of the string Pin
#realJSOP28-Aug-08 23:45
mve#realJSOP28-Aug-08 23:45 
AnswerRe: Returning the right side of the string [modified] Pin
DaveyM6928-Aug-08 23:42
professionalDaveyM6928-Aug-08 23:42 
AnswerRe: Returning the right side of the string Pin
#realJSOP28-Aug-08 23:43
mve#realJSOP28-Aug-08 23:43 
QuestionVisual Studio 2003 - How to get it ? Pin
Kenneth Broendum28-Aug-08 23:03
Kenneth Broendum28-Aug-08 23:03 
AnswerRe: Visual Studio 2003 - How to get it ? Pin
Anthony Mushrow28-Aug-08 23:23
professionalAnthony Mushrow28-Aug-08 23:23 
GeneralRe: Visual Studio 2003 - How to get it ? Pin
Manas Bhardwaj28-Aug-08 23:46
professionalManas Bhardwaj28-Aug-08 23:46 
GeneralRe: Visual Studio 2003 - How to get it ? Pin
Kenneth Broendum29-Aug-08 1:20
Kenneth Broendum29-Aug-08 1:20 
GeneralRe: Visual Studio 2003 - How to get it ? Pin
Mark Salsbery29-Aug-08 11:24
Mark Salsbery29-Aug-08 11:24 
GeneralRe: Visual Studio 2003 - How to get it ? Pin
Anthony Mushrow29-Aug-08 1:32
professionalAnthony Mushrow29-Aug-08 1:32 
AnswerRe: Visual Studio 2003 - How to get it ? Pin
Manas Bhardwaj28-Aug-08 23:49
professionalManas Bhardwaj28-Aug-08 23:49 

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.