Click here to Skip to main content
15,892,643 members
Home / Discussions / C#
   

C#

 
GeneralIO.Directory.GetFiles() Problem.. Pin
ptr2void27-Feb-08 0:55
ptr2void27-Feb-08 0:55 
GeneralRe: IO.Directory.GetFiles() Problem.. Pin
Giorgi Dalakishvili27-Feb-08 1:02
mentorGiorgi Dalakishvili27-Feb-08 1:02 
Questionhow to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
puneet.priyadarshi27-Feb-08 0:48
puneet.priyadarshi27-Feb-08 0:48 
GeneralRe: how to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
Giorgi Dalakishvili27-Feb-08 0:57
mentorGiorgi Dalakishvili27-Feb-08 0:57 
GeneralRe: how to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
puneet.priyadarshi27-Feb-08 1:00
puneet.priyadarshi27-Feb-08 1:00 
GeneralRe: how to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
Giorgi Dalakishvili27-Feb-08 1:04
mentorGiorgi Dalakishvili27-Feb-08 1:04 
GeneralRe: how to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
Mel Padden27-Feb-08 2:33
Mel Padden27-Feb-08 2:33 
GeneralRe: how to convert a file(word doc, image etc) to byte array and back to file(word doc,image etc) Pin
Xmen Real 27-Feb-08 2:41
professional Xmen Real 27-Feb-08 2:41 
-------------------
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
int length = (int)fs.Length;
byte[] content = new byte[length];
fs.Read(content, 0, length);
--------------------

ah, a long way to convert a file into byte[],
try
byte[] mybytes = File.ReadAllBytes(filePath);


to write byte(back to file)
File.WriteAllBytes(filePath, mybytes);


hope this will help

TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can

QuestionHow to get column size of a table Pin
sri_k4727-Feb-08 0:01
sri_k4727-Feb-08 0:01 
AnswerRe: How to get column size of a table Pin
Gareth H27-Feb-08 0:49
Gareth H27-Feb-08 0:49 
QuestionHow to create folder [modified] Pin
sugunavathysubramanian26-Feb-08 23:52
sugunavathysubramanian26-Feb-08 23:52 
AnswerRe: How to create folder Pin
Martin#26-Feb-08 23:56
Martin#26-Feb-08 23:56 
GeneralRe: How to create folder Pin
sugunavathysubramanian27-Feb-08 0:27
sugunavathysubramanian27-Feb-08 0:27 
GeneralRe: How to create folder Pin
Justin Perez27-Feb-08 4:25
Justin Perez27-Feb-08 4:25 
AnswerRe: How to create folder Pin
Giorgi Dalakishvili26-Feb-08 23:59
mentorGiorgi Dalakishvili26-Feb-08 23:59 
Generalproblem with richtextbox Keypress Event Pin
DKalepu26-Feb-08 23:31
DKalepu26-Feb-08 23:31 
GeneralRe: problem with richtextbox Keypress Event Pin
telha27-Feb-08 1:25
telha27-Feb-08 1:25 
GeneralRe: problem with richtextbox Keypress Event Pin
DKalepu27-Feb-08 19:03
DKalepu27-Feb-08 19:03 
GeneralPausing thread untill asynchronous operation finishes. Pin
N a v a n e e t h26-Feb-08 23:28
N a v a n e e t h26-Feb-08 23:28 
GeneralRe: Pausing thread untill asynchronous operation finishes. Pin
Martin#26-Feb-08 23:47
Martin#26-Feb-08 23:47 
GeneralRe: Pausing thread untill asynchronous operation finishes. Pin
N a v a n e e t h27-Feb-08 0:00
N a v a n e e t h27-Feb-08 0:00 
GeneralRe: Pausing thread untill asynchronous operation finishes. Pin
buchstaben27-Feb-08 0:49
buchstaben27-Feb-08 0:49 
GeneralRe: Pausing thread untill asynchronous operation finishes. Pin
N a v a n e e t h27-Feb-08 1:00
N a v a n e e t h27-Feb-08 1:00 
GeneralRe: Pausing thread untill asynchronous operation finishes. Pin
Bekjong27-Feb-08 1:35
Bekjong27-Feb-08 1:35 
AnswerRe: Pausing thread untill asynchronous operation finishes. Pin
telha27-Feb-08 1:27
telha27-Feb-08 1:27 

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.