12,406,342 members (70,779 online)
Rate this:
See more:
Hi,

This is my string value

```string A="O10070-A-IT-03-DC-1000";
```

this is my another string value

`string B="O10070-A-IT";`

this is another string value

```string C="03";
string D="DC";
string E="1000";
```

Here , Please observe my strings it's look like a B+C+D+E=A.
now i want to check the Value of A this is mixing of B,C,D,E or not.

Posted 17-Jan-13 17:38pm
Updated 17-Jan-13 18:04pm
v2
Shanu2rick 17-Jan-13 23:44pm

What do you mean by comparison?
jibesh 17-Jan-13 23:46pm

you can use the string.Compare function to compare the strings what do you want more than this?

Rate this:

## Solution 1

Have a look at this[^]. You can compare any string you want.
Shanu2rick 18-Jan-13 0:08am

You can concate all(B,C,D,E) and then compare it with String A.
Rate this:

## Solution 2

hi,

you can used stringvalue.contains();

see below example----

```if (stringValue.Contains(anotherStringValue))
{
// Do Something //
}```

Welcome;-)

Top Experts
Last 24hrsThis month
 OriginalGriff 306 Karthik Bangalore 194 ppolymorphe 124 BillWoodruff 115 Richard MacCutchan 105
 OriginalGriff 7,947 Karthik Bangalore 3,521 ppolymorphe 3,384 Richard MacCutchan 2,577 F-ES Sitecore 2,300