R
RedLars
I would like to execute different code depending on whether using
vs2002 or vs2008. I have seen other articles refer to _MSC_VER but I
do not understand how to use this variable using C#.
The following code I must admit is based on a C++ example I found
(shame on me):
private void Foo()
{
#if (_MSC_VER >= 1500)
// VS2008 code
#else
// VS2002 code
#endif
}
The code generates the following error message when I try to compile
it:
") expected"
"Single-line comment or end-of-line expected".
The first error message refers to the '>' sign.
I am not familiar with using preprocessor directives in C#. How could
I solve this issue?
vs2002 or vs2008. I have seen other articles refer to _MSC_VER but I
do not understand how to use this variable using C#.
The following code I must admit is based on a C++ example I found
(shame on me):
private void Foo()
{
#if (_MSC_VER >= 1500)
// VS2008 code
#else
// VS2002 code
#endif
}
The code generates the following error message when I try to compile
it:
") expected"
"Single-line comment or end-of-line expected".
The first error message refers to the '>' sign.
I am not familiar with using preprocessor directives in C#. How could
I solve this issue?