sharing a class between CF and non-CF projects

C

Capital O

I want to define my domain object classes (Customers, Orders, etc.) in
an assembly to use in Compact Framework as well as ASP.NET and Windows
Forms components. I don't want to duplicate validation logic, property
definitions, etc. I'm considering using XPO (ORM) or something
similar, and there are different references I need to use if I'm in one
world or the other.

Has anyone out there successfully straddled the CF and non-CF worlds
this way? In C++, eVC, etc., you could use pre-compiler directives to
include or exclude source files based on pre-compiler constants. Does
Visual Studio 2005 have something like this? Is there a sneaky little
trick I could use?

O
 
I

Ilya Tumanov [MS]

If you compile your business classes for NETCF and do not use NETCF specific
stuff, you could use very same binaries on desktop.

Alternatively you could use conditional compilation.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 

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