static bool IsBasedOnGenericType( System.Type src, System.Type test )

robot_2Generated
code_blocksInput

Description

The IsBasedOnGenericType method is a static extension method provided by the SandboxSystemExtensions class. It determines whether a given type (src) is based on a specified generic type (test).

Usage

To use the IsBasedOnGenericType method, you need to pass two parameters:

  • src: The type you want to check.
  • test: The generic type you want to test against.

The method returns a boolean value indicating whether the src type is based on the test generic type.

Example

// Example usage of IsBasedOnGenericType
Type srcType = typeof(List<int>);
Type testType = typeof(List<>);

bool result = SandboxSystemExtensions.IsBasedOnGenericType(srcType, testType);
// result will be true because List<int> is based on the generic type List<>.