Click here to Skip to main content
15,565,474 members
Home / Discussions / C#
   

C#

 
GeneralRe: need to import weird C struct Pin
sammyh23-Jan-04 10:25
sammyh23-Jan-04 10:25 
Questionhow do i enable directx? Pin
godzooky23-Jan-04 6:20
godzooky23-Jan-04 6:20 
AnswerRe: how do i enable directx? Pin
sammyh23-Jan-04 6:33
sammyh23-Jan-04 6:33 
AnswerRe: how do i enable directx? Pin
Heath Stewart23-Jan-04 6:35
protectorHeath Stewart23-Jan-04 6:35 
GeneralRe: how do i enable directx? Pin
godzooky23-Jan-04 7:13
godzooky23-Jan-04 7:13 
GeneralRe: how do i enable directx? Pin
Heath Stewart23-Jan-04 7:34
protectorHeath Stewart23-Jan-04 7:34 
GeneralRe: how do i enable directx? Pin
AllanC123-Jan-04 18:34
AllanC123-Jan-04 18:34 
GeneralNeed help from someone with C++ background Pin
J. Eric Vaughan23-Jan-04 5:39
J. Eric Vaughan23-Jan-04 5:39 
In C++, I can do this (this is ugly Eek! | :eek: and simplified):
void Foo()
{
   CMyClass cMyClass;
   Bar( (void*) &cMyClass );
}

void Bar( void* pData )
{
    CMyClass* pMyClass = static_cast<CMyClass*>(pData); //I KNOW pData is a CMyClass object
}

In C#, how can I convert an object (class) to an array of bytes, send that to someone else (e.g., with sockets), and then recreate that object with that array of bytes. Is using BinaryFormatter on a MemoryStream what I need? Confused | :confused:

To further complicate things, what if I don't know the class type, but I KNOW that it is derived from a particular base class? E.g., I know it's a CAnimal, but I don't know if it is a CElephant or a CDog. How can I find out?

Thanks
GeneralRe: Need help from someone with C++ background Pin
Heath Stewart23-Jan-04 6:17
protectorHeath Stewart23-Jan-04 6:17 
GeneralRe: Need help from someone with C++ background Pin
J. Eric Vaughan23-Jan-04 7:33
J. Eric Vaughan23-Jan-04 7:33 
GeneralRe: Need help from someone with C++ background Pin
Heath Stewart23-Jan-04 7:36
protectorHeath Stewart23-Jan-04 7:36 
GeneralRe: Need help from someone with C++ background Pin
J. Eric Vaughan23-Jan-04 9:42
J. Eric Vaughan23-Jan-04 9:42 
Questionhow to load referenced assemblies Pin
occcy23-Jan-04 5:23
occcy23-Jan-04 5:23 
AnswerRe: how to load referenced assemblies Pin
Heath Stewart23-Jan-04 5:53
protectorHeath Stewart23-Jan-04 5:53 
GeneralGAC / Reference / VStudio Pin
dabossuk23-Jan-04 3:25
dabossuk23-Jan-04 3:25 
GeneralRe: GAC / Reference / VStudio Pin
Heath Stewart23-Jan-04 5:44
protectorHeath Stewart23-Jan-04 5:44 
GeneralMultiple InternetExplorer objects' DownloadComplete event Pin
profoundwhispers23-Jan-04 1:07
profoundwhispers23-Jan-04 1:07 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
Mazdak23-Jan-04 3:20
Mazdak23-Jan-04 3:20 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
profoundwhispers23-Jan-04 5:17
profoundwhispers23-Jan-04 5:17 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
Mazdak23-Jan-04 5:34
Mazdak23-Jan-04 5:34 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
Heath Stewart23-Jan-04 5:42
protectorHeath Stewart23-Jan-04 5:42 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
profoundwhispers23-Jan-04 5:53
profoundwhispers23-Jan-04 5:53 
GeneralRe: Multiple InternetExplorer objects' DownloadComplete event Pin
Heath Stewart23-Jan-04 5:58
protectorHeath Stewart23-Jan-04 5:58 
GeneralHelp with Collections Pin
crushinghellhammer22-Jan-04 19:19
crushinghellhammer22-Jan-04 19:19 
GeneralRe: Help with Collections Pin
Heath Stewart22-Jan-04 19:49
protectorHeath Stewart22-Jan-04 19: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.