Get precompiler value in C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • knurgb

    Get precompiler value in C#

    Hello,

    Is it possible to read precompiled value in C# code?

    E.g.: in VS define sumbol VER="1.1.1.*"
    and in C# code read this value to some parameter.

    Thanks,
    Grzegorz

  • Kevin Spencer

    #2
    Re: Get precompiler value in C#

    If you're talking about preprocessor statements, no. These are preprocessor
    directives, used for conditional compilation. After compilation, they do not
    exist in the code generated.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    Chicken Salad Shooter
    Thoughts and Ideas about programming, philosophy, science, arts, life, God, and related subjects.


    A man, a plan, a canal, a palindrome that has.. oh, never mind.

    "knurgb" <gb@gazeta.plwr ote in message
    news:1160395139 .054366.7290@c2 8g2000cwb.googl egroups.com...
    Hello,
    >
    Is it possible to read precompiled value in C# code?
    >
    E.g.: in VS define sumbol VER="1.1.1.*"
    and in C# code read this value to some parameter.
    >
    Thanks,
    Grzegorz
    >

    Comment

    • Mattias Sjögren

      #3
      Re: Get precompiler value in C#


      Plus in C# they can't be assigned values. They can only be defined or
      not defined.


      Mattias

      --
      Mattias Sjögren [C# MVP] mattias @ mvps.org
      http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
      Please reply only to the newsgroup.

      Comment

      Working...