load different classes depending on os (win32/wince)

M

mschuhmann

Hi,

I'm new to C# and CF-Programming.
I'm programming a small app for the Pocket PC as intelligent
application-project in VC2003. I want to write/read to the registry and
use code from OpenNETCF (OpenNETCF.Win32.Registry). This works fine.

But I also want my program work on the desktop and want to use
therefore the Microsoft.Win32.Registry-Classes. But how can I do this?

I tried to make 2 projects (one CF-Project and one WinApp-Project in
the same Directory like described here:
http://www.danielmoth.com/Blog/2004/09/share-code-if-fullframe_17.html),
this worked first, but after some time, VS couldn't load the forms
anymore because of some errors (I don't know why...)

Now I want to dynamically load the different Classes depending on the
Runtime-OS, but don't know how to do this.

Can anybody help or have a link to some sample code?

thx
Martin
 
J

Joseph Byrns

If you are trying to load managed assemblies (such as ones you've created
yourself) then I think you need System.Reflection, if you search the forum
you will a lot of stuff on reflection.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top