Click here to Skip to main content
15,905,877 members
Home / Discussions / C#
   

C#

 
GeneralRe: character postion replacemenet Pin
ps_prakash0218-Aug-10 4:27
ps_prakash0218-Aug-10 4:27 
QuestionDataSet does not support System.Nullable<> Pin
treuveni17-Aug-10 23:24
treuveni17-Aug-10 23:24 
AnswerRe: DataSet does not support System.Nullable Pin
Bernhard Hiller18-Aug-10 4:24
Bernhard Hiller18-Aug-10 4:24 
AnswerRe: DataSet does not support System.Nullable Pin
Madmaximus7-Jul-11 4:48
Madmaximus7-Jul-11 4:48 
QuestionSD Card Pin
dataminers17-Aug-10 22:21
dataminers17-Aug-10 22:21 
AnswerRe: SD Card Pin
R. Giskard Reventlov17-Aug-10 22:32
R. Giskard Reventlov17-Aug-10 22:32 
AnswerRe: SD Card Pin
Thomas Krojer18-Aug-10 1:25
Thomas Krojer18-Aug-10 1:25 
QuestionBit Shifting problem Pin
norjali17-Aug-10 21:15
norjali17-Aug-10 21:15 
AnswerRe: Bit Shifting problem Pin
DaveyM6917-Aug-10 21:25
professionalDaveyM6917-Aug-10 21:25 
GeneralRe: Bit Shifting problem Pin
norjali17-Aug-10 21:28
norjali17-Aug-10 21:28 
AnswerRe: Bit Shifting problem Pin
Richard MacCutchan17-Aug-10 21:26
mveRichard MacCutchan17-Aug-10 21:26 
GeneralRe: Bit Shifting problem Pin
norjali17-Aug-10 21:30
norjali17-Aug-10 21:30 
GeneralRe: Bit Shifting problem Pin
norjali17-Aug-10 21:53
norjali17-Aug-10 21:53 
GeneralRe: Bit Shifting problem Pin
Richard MacCutchan17-Aug-10 22:18
mveRichard MacCutchan17-Aug-10 22:18 
QuestionDataadapter and datasets issue Pin
maephisto00717-Aug-10 20:44
maephisto00717-Aug-10 20:44 
Questioncache the name using input param.. Pin
A.Machan Kachan17-Aug-10 17:56
A.Machan Kachan17-Aug-10 17:56 
QuestionHow to convert any object to byte[] without marking it Serializable or DataContract? Pin
1eyhk117-Aug-10 16:35
1eyhk117-Aug-10 16:35 
hello

How to convert any object to byte[] without marking it Serializable or DataContract?

Of course this would work but you'd need to mark myObj class Serializable (I'm lazy dont want handcode serializable for big classes sorry)

using (System.IO.MemoryStream returnStm = new System.IO.MemoryStream())
{
BinaryFormatter ftm = new BinaryFormatter();
ftm.Serialize(returnStm , myObj);
return returnStm .ToArray(); // this would return byte[]
}

Anyone who can tell me how I can commit such crime?

Thank you
AnswerRe: How to convert any object to byte[] without marking it Serializable or DataContract? Pin
Gonzalo Cao17-Aug-10 20:56
Gonzalo Cao17-Aug-10 20:56 
GeneralRe: How to convert any object to byte[] without marking it Serializable or DataContract? Pin
1eyhk118-Aug-10 1:51
1eyhk118-Aug-10 1:51 
GeneralReverse Pin
1eyhk118-Aug-10 16:19
1eyhk118-Aug-10 16:19 
GeneralRe: Reverse Pin
Gonzalo Cao18-Aug-10 20:18
Gonzalo Cao18-Aug-10 20:18 
GeneralRe: Reverse Pin
1eyhk118-Aug-10 21:43
1eyhk118-Aug-10 21:43 
GeneralRe: Reverse Pin
Gonzalo Cao18-Aug-10 21:44
Gonzalo Cao18-Aug-10 21:44 
GeneralWokring now, atttempts: from interop to BinaryFormatter to DataContractSerializer - still need to see MyAccount[] Pin
1eyhk120-Aug-10 19:33
1eyhk120-Aug-10 19:33 
GeneralRe: Wokring now, atttempts: from interop to BinaryFormatter to DataContractSerializer - still need to see MyAccount[] Pin
Gonzalo Cao23-Aug-10 21:50
Gonzalo Cao23-Aug-10 21:50 

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.