c# volatile and wince (.net cf?)

  • Thread starter Thread starter hwc
  • Start date Start date
H

hwc

I have some code that use volatile
for destop and pocketpc use,
it's ok on desktop,
but got error msg
"CS0518: The predefined type
'System.Runtime.CompilerServices.IsVolatile'
is not defined or imported"

what should I do?

Thanks.
(
VS 2003 Ver 7.1.3088,
.Net Framewark 1.1 ver 1.1.4322
)
 
I don't know much about the compact frameworks, but that would seem to
indicate that volatile is not supported by the compact frameworks. You can
easily work-around the compiler error by defining the type, and then you can
see what happens when you run the application on your device (it will
probably throw some sort of runtime exception). To define the type, simply
add a class definition something like this:

namespace System.Runtime.CompilerServices
{
class IsVolatile
{
}
}
 
Back
Top