Click here to Skip to main content
15,922,325 members
Home / Discussions / C#
   

C#

 
QuestionImporting Macros from C header files? Pin
iliyang16-Jun-05 4:03
iliyang16-Jun-05 4:03 
AnswerRe: Importing Macros from C header files? Pin
Colin Angus Mackay16-Jun-05 4:32
Colin Angus Mackay16-Jun-05 4:32 
AnswerRe: Importing Macros from C header files? Pin
Dave Kreskowiak16-Jun-05 4:55
mveDave Kreskowiak16-Jun-05 4:55 
GeneralRe: Importing Macros from C header files? Pin
iliyang16-Jun-05 5:06
iliyang16-Jun-05 5:06 
GeneralRe: Importing Macros from C header files? Pin
Dave Kreskowiak16-Jun-05 5:10
mveDave Kreskowiak16-Jun-05 5:10 
GeneralNow Im really irritated!! Pin
Anthony Mushrow16-Jun-05 3:07
professionalAnthony Mushrow16-Jun-05 3:07 
GeneralRe: Now Im really irritated!! Pin
iliyang16-Jun-05 4:08
iliyang16-Jun-05 4:08 
GeneralRe: Now Im really irritated!! Pin
Michael Potter16-Jun-05 4:15
Michael Potter16-Jun-05 4:15 
If rm.GetObject("outside") returns a byte[], then how do you expect to cast it to a FileStream. The 'as' operator casts an object if possible and returns null if it can't. The objects cannot be directly converted into each other therefore, fs is null.

The easiest stream you can create with a byte[] array is MemoryStream.
MemoryStream ms = new MemoryStream((byte[])rm.GetObject("outside"));

If your goal is to write a byte[] array to a file then try a pattern like this:
byte[] tmp = (byte[])rm.GetObject("outside");
FileStream fs = new FileStream(FILE_NAME, FileMode.CreateNew);
fs.Write(tmp,0,tmp.Length);
fs.Close();

Generalretrieving http sites (frames) Pin
alexffm16-Jun-05 3:00
alexffm16-Jun-05 3:00 
GeneralRe: retrieving http sites (frames) Pin
S. Senthil Kumar16-Jun-05 3:18
S. Senthil Kumar16-Jun-05 3:18 
GeneralRe: retrieving http sites (frames) Pin
alexffm16-Jun-05 3:31
alexffm16-Jun-05 3:31 
GeneralRe: retrieving http sites (frames) Pin
S. Senthil Kumar16-Jun-05 3:45
S. Senthil Kumar16-Jun-05 3:45 
GeneralRe: retrieving http sites (frames) Pin
alexffm16-Jun-05 3:54
alexffm16-Jun-05 3:54 
GeneralCompiling C# Code at runtime Pin
Sumit Domyan16-Jun-05 2:33
Sumit Domyan16-Jun-05 2:33 
GeneralRe: Compiling C# Code at runtime Pin
tom_dx16-Jun-05 2:55
tom_dx16-Jun-05 2:55 
GeneralRe: Compiling C# Code at runtime Pin
S. Senthil Kumar16-Jun-05 3:27
S. Senthil Kumar16-Jun-05 3:27 
GeneralRe: Compiling C# Code at run time Pin
eggie516-Jun-05 5:38
eggie516-Jun-05 5:38 
GeneralRe: Compiling C# Code at run time Pin
S. Senthil Kumar16-Jun-05 5:42
S. Senthil Kumar16-Jun-05 5:42 
QuestionCan someone suggest me style improvements? Pin
Alex Cutovoi16-Jun-05 1:58
Alex Cutovoi16-Jun-05 1:58 
GeneralSQLDMO Create Database in C# Pin
gordsh16-Jun-05 1:39
gordsh16-Jun-05 1:39 
QuestionHow to write Installer for a executable file Pin
pakFari16-Jun-05 1:32
pakFari16-Jun-05 1:32 
AnswerRe: How to write Installer for a executable file Pin
nemopeti16-Jun-05 3:55
nemopeti16-Jun-05 3:55 
AnswerRe: How to write Installer for a executable file Pin
S. Senthil Kumar16-Jun-05 5:05
S. Senthil Kumar16-Jun-05 5:05 
GeneralRe: How to write Installer for a executable file Pin
pakFari16-Jun-05 20:49
pakFari16-Jun-05 20:49 
GeneralOpen Graphic files in real PixelFormat Pin
Alpini16-Jun-05 1:01
Alpini16-Jun-05 1:01 

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.