If you need to get the CLR version during run time, using:
System.Runtime.InteropServices.RuntimeEnvironment.GetSystemVersion();
Davey,
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Beer is part of the life.
http://www.lovebeers.com
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
ezmera...@gmx.de wrote:
> Hello,
>
> I have some code which shall be compiled in .NET v1.1 and v2.0 but
> which
> has to be different for the two .NET-Versions.
>
> Therefore I need to use a construct like
>
> #if NET_20
> <2.0 specific code>
> #else
> <1.1 specific code>
> #endif
>
> which enables the correct code at COMPILE TIME (it is not possible
> to decide at runtime for my purposes!).
>
> The question is: is there a define like NET_20 which is set
> automatically by
> the Visual Studio? Do you see any other chances to handle such
> problems?
>
> Thanks!