The Icon
field in the DisplayInfo
struct represents the material icon associated with a type or member. This icon is typically used for UI representation and is defined using the IconAttribute
.
The Icon
field in the DisplayInfo
struct represents the material icon associated with a type or member. This icon is typically used for UI representation and is defined using the IconAttribute
.
To use the Icon
field, you can access it directly from an instance of DisplayInfo
. This field is a string
that holds the name or identifier of the material icon.
// Example of accessing the Icon field from a DisplayInfo instance DisplayInfo displayInfo = new DisplayInfo(); string icon = displayInfo.Icon; // Set the icon // Assuming you have a valid icon name string newIcon = "home"; displayInfo.Icon = newIcon; // Use the icon in your UI logic // For example, setting an icon in a UI component // uiComponent.SetIcon(displayInfo.Icon);