Chris Anderson

Chris Anderson

  • NA
  • 93
  • 9.3k

Create an object in object

Jan 19 2021 7:49 PM
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. 
 
 
  1. Petowner.Pets.Add(new Cat  
  2. {  
  3.     Name = "Rambo",  
  4.     IsHungry = new Application ShuffleProbability(), // How to use this?  
  5. });  

Answers (1)