I am trying to get the new words from the second string when match the same word(second string) from another string(first string)
Current output is:
Insert Word Is: matching hims by website
I want to:
Insert Word Is: by website
.cs
- protected void Button1_Click(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- Label3.Text = "";
- }
-
- var result1 = stextbox.Text.Split(new char[] { ' ' }).Except(ftextbox.Text.Split(new char[] { ' ' })).ToArray();
- int count = 0;
- count = result1.Length;
-
-
-
- for (int i = 0; i < count; i++)
- {
- Label3.Text += result1[i].ToString() + " ";
- }
-
- Label3.Text = "Insert Word Is: " + Label3.Text;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
.aspx
- <asp:TextBox ID="ftextbox" runat="server" TextMode="MultiLine" Width="500px" Height="200px"></asp:TextBox>
- <asp:TextBox ID="stextbox" runat="server" TextMode="MultiLine" Width="500px" Height="200px"></asp:TextBox>
- <br /><br />
- <asp:Button ID="Button1" runat="server" Text="Compare" OnClick="Button1_Click" />
- <br />
need help