Hi,
There are a couple of errors in the following lines of code:
if (b ! = null)
Console.WriteLine("Baby is called:{0}", b.Babycalled());
1. Should be
!=
, not
! =
(without a space).
2. Should be
BabyCalled
, not
Babycalled
(case sensitivity).
Correct version:
if (b != null)
Console.WriteLine("Baby is called:{0}", b.BabyCalled());