bool IsFavourite { get; set; }

book_4_sparkGenerated
code_blocksInput

Description

The IsFavourite property indicates whether a particular asset is marked as a favorite by the user. This property is part of the Sandbox.Package class and is used to determine if the asset is included in the user's list of favorite assets.

Usage

To check if a package is marked as a favorite, access the IsFavourite property on an instance of the Package class. This property returns a bool value: true if the package is a favorite, and false otherwise.

Example

// Example of checking if a package is a favorite
Package myPackage = GetPackage(); // Assume GetPackage() retrieves a Package instance
bool isFavorite = myPackage.IsFavourite;

if (isFavorite)
{
    // Perform actions for favorite packages
    Console.WriteLine("This package is a favorite!");
}
else
{
    // Perform actions for non-favorite packages
    Console.WriteLine("This package is not a favorite.");
}