I want to add a string after the age declaration. Depending if it is a dog or a puppy I want to add either "year" or "month" after. Is this possible?
- string name;
- int age;
- Animal cat = new Cat();
- cat.Name = name;
- cat.Age = age + "months"; // This I want to add a string after the int value
- Petowner.Pets.Add(cat);
Excuse me for my drawing skills :)

Amit GuptaRank #190 · 12.8K reputationPosted Mar 6, 2021, 12:20 PM EST
Chris Anderson137 reputationPosted Mar 6, 2021, 12:29 PM EST
Amit GuptaRank #190 · 12.8K reputationPosted Mar 6, 2021, 12:35 PM EST