Compiler Warning (level 4) C4400


For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

'type' : const/volatile qualifiers on this type are not supported

The constand volatilequalifiers will not work with variables of common language runtime types.

The following sample generates C4400.

// C4400.cpp  
// compile with: /clr /W4  
// C4401 expected  
using namespace System;  
#pragma warning (disable : 4101)  
int main() {  
   const String^ str;   // C4400  
   volatile String^ str2;   // C4400