Aug 30, 2017 01:40 AM|PaulTheSmith|LINK
For other people who may have a similar question in the future it should be pointed out that the solution given does not work in a more general situation. Consider if StringB is
"SUB A1=10","SUB A2=20", "SUB A=30"
The code shown will return "SUB A1=10" when the correct answer is "SUB A=30"
One way (there are many ways, of course) to get the correct answer is
var result = StringB.SingleOrDefault(s => s.Split('=') == StringA);
(This is just the outline of a solution, you probably should handle leading and trailing whitespace and consider differences in case for a more robust solution)