Check all string in comma separated string exist in other using C# and VB.Net in ASP.Net

Last Reply one month ago By manvendra45

Posted one month ago

How to check all value with comma-separated exist in other parent comma separated in  c#

Suppose we have two string with comma-separated

for example  

string ParentString ="AAA,BBB,CCC";

String childstring ="BBB,CCC"

it must return true because all child string matched in parentstring

second example  

string ParentString ="AAA,BBB,CCC";

String childstring ="AA,CCC"

In this case, it must return false, because "AA" does not match any words which are comma-separated in ParentString 

Please help me, anyone, I had tried with Split and Contain function, but fail.

This question does not have replies that have been liked.