How to split and get value based on my count.
I have inputcount = 2
MyString = "ABC_21-NIM-3547-789_23-278";
i want to get the final string is "ABC_21-NIM". because my input is "2". so i want to split("-") and get the values.
so final output after splitting
ABC_21-NIM ( here ABC_21 is first string and NIM is second string)
how to form the values using LINQ C#.?