There are some classes (of the .NET framework 3.5) that contain some methods that are supported in .NET Compact Framework, and some methods that are not supported. There are also some classes that does not exists for the .NET Compact Framework.
For example for the System.IO.File
class, the File.Create
function is supported by .NET Compact Framework, but the File.Encrypt
function is not.
Another example: the System.IO.File
class is supported by .NET Compact Framework, but the System.Diagnostic.StackTrace
is not.
I need to tell to the compiler something like this:
#ifdef COMPACT_FRAMEWORK // I'm compiling this from a smart device project
MyEncryptMethod("filename");
#else // I'm compiling this from a desktop project
File.Encrypt("filename");
#endif
How can I do?
(The specific version is Windows Mobile 6.1 Professional).