/// <summary> /// In the constructor it is not possile to access the _name property in /// LooseCouplingA, and so we have loose coupling. /// </summary> public LooseCouplingB() { LooseCouplingA lca = new LooseCouplingA(); lca = null; Debug.WriteLine($"Name is {lca.Name}"); }
/// <summary> /// In the constructor it is not possile to access the _name property in /// LooseCouplingA, and so we have loose coupling. /// </summary> public LooseCouplingB() { var lca = new LooseCouplingA { Name = string.Empty }; Debug.WriteLine($"Name is {lca.Name}"); }