Skip to main content

IClass.SuperClasses property

Namespace: NextDesign.Core

Description

the direct superclass of this class
Returns an empty collection if it has no direct superclass.

IClassCollection SuperClasses { get; }

type

  • IClassCollection

Annotations

About API specification change and migration method in Ver.1.1

In previous API specs, this property could retrieve all superclasses in an inheritance relationship, including classes inherited by superclasses. From Ver.1.1 onwards, it was changed to get only superclasses that are directly inherited from this class.
(The previous behavior can be replaced with the GetAllSuperClasses() method).
If you are using this API, you need to change the corresponding part in the extension along with the version upgrade to Ver.1.1 or later.

Please refer to the following example and change it.

Before

IClass myClass = ...;
foreach (var superClasse in myClass.SuperClasses)
{
//do something with the superclass...
}

After

IClass myClass = ...;
foreach (var superClasse in myClass.GetAllSuperClasses())
{
//do something with the superclass...
}