What's the syntax for creating a new object within another object?
I'm trying to create the object Application in order to use the ShuffleProbability method as shown below.
- Petowner.Pets.Add(new Cat
- {
- Name = "Rambo",
- IsHungry = new Application ShuffleProbability(), // How to use this?
- });
Ben ThompsonPosted Jan 19, 2021, 9:02 PM