visual studio 2015 - How do I handle a C# codebase being edited in both VS 2013 and VS2015 with regards to the breaking change of "using static" in C# 6.0? -



visual studio 2015 - How do I handle a C# codebase being edited in both VS 2013 and VS2015 with regards to the breaking change of "using static" in C# 6.0? -

i have c# codebase beingness edited in both vs 2013 , vs 2015 ctp 6. ctp 6 has come c# v6 requires "using static" on imports.

is there way in can determine version (either vs or c#) beingness used such can utilize preprocessor directive utilize either "using" or "using static"?

e.g.

#if cs6 using static ... #else using ... #endif

a preprocessor directive initial thought. if there way ears.

the static using shouldn't required; syntactic sugar has been added c# 6.0. should always able specify qualified name of static method phone call it, e.g. instead of

using system.environment; // class , method declaration elided var path = getfolderpath(...);

you have

// no static using here! // class , method declaration elided var path = system.environment.getfolderpath(...);

or, if don't have class of own called system (why that?):

// still no static using here! using system; // class , method declaration elided var path = environment.getfolderpath(...);

visual-studio-2015 c#-6.0

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -