Description
The All
property of the AchievementCollection
class provides a read-only collection of all achievements associated with a specific package. This property allows you to access the complete list of achievements without the ability to modify the collection directly.
Usage
To access the All
property, you need to have an instance of the AchievementCollection
class. Once you have the instance, you can retrieve the collection of achievements as follows:
var achievementCollection = new AchievementCollection();
var allAchievements = achievementCollection.All;
This will give you an IReadOnlyCollection<Achievement>
containing all the achievements.
Example
// Example of accessing the All property
AchievementCollection achievementCollection = new AchievementCollection();
IReadOnlyCollection<Achievement> allAchievements = achievementCollection.All;
foreach (var achievement in allAchievements)
{
// Process each achievement
Console.WriteLine($"Achievement: {achievement.Name}");
}