The requested page is not available for the requested platform. You are viewing the content for Default platform.

Cannot inherit from special class 'System.ValueType'

CodeRush Classic shows the Cannot inherit from special class 'System.ValueType' code issue if a class inherits from the System.ValueType class.

Fix

Make the current class not a descendant of System.ValueType class.

Purpose

Highlights the class declaration statements, which would cause the Cannot inherit from special class 'System.ValueType' compilation error.

Example

public class TestClass: ValueType

Fix:

public class TestClass