Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Pragma #IF Netduino

  • Please log in to reply
1 reply to this topic

#1 Dixon


    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 03 September 2011 - 02:49 PM

Is there any pragma instruction we can use to conditionally compile modules including the right definitions for each type of hardware? For instance: using System; using System.IO; using System.IO.Ports; using System.Threading; using Microsoft.SPOT; using Microsoft.SPOT.Hardware; using SecretLabs.NETMF.Hardware; #if NetduinoMini using SecretLabs.NETMF.Hardware.NetduinoMini; #end #if NetduinoPlus using SecretLabs.NETMF.Hardware.NetduinoPlus; #end so we can create generic modules?

#2 Fred


    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 03 September 2011 - 03:46 PM

Yes. I've done exactly that. You'll need 2 separate projects and to define the flags yourself - one in each project.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.