Exemplo n.º 1
0
 /// <summary>
 /// Checks if the current chain is the child of another chain.
 /// For example, if chain1 were for "Parent.Child" and chain2 were for "Parent.Child.GrandChild" then
 /// chain2.IsChildChainOf(chain1) would be true.
 /// </summary>
 /// <param name="parentChain">The parent chain to compare</param>
 /// <returns>True if the current chain is the child of the other chain, otherwise false</returns>
 public bool IsChildChainOf(PropertyChain parentChain)
 {
     return(ToString().StartsWith(parentChain.ToString()));
 }