Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 866 Bytes

compiler-warning-level-4-c4434.md

File metadata and controls

25 lines (20 loc) · 866 Bytes
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: Compiler Warning (level 4) C4434
Compiler Warning (level 4) C4434
11/04/2016
C4434
C4434
24b8785e-353a-4c37-8bed-ed61001a871d

Compiler Warning (level 4) C4434

a class constructor must have private accessibility; changing to private access

C4434 indicates that the compiler changed the accessibility of a static constructor. Static constructors must have private accessibility, as they are only meant to be called by the common language runtime. For more information, see Static constructors.

Example

The following sample generates C4434.

// C4434.cpp
// compile with: /W4 /c /clr
public ref struct R {
   static R(){}   // C4434
};