Link to home
Start Free TrialLog in
Avatar of Gani tpt
Gani tpt

asked on

LINQ - How to get particular position Word from a string using LINQ

How to find the exact particulate word from a string using LINQ.

MyString = "10"-550-HO-004-01-12XVRU-XA";

MyPositionNo(Input)  : 4

Result : 004

MyPositionNo(Input)  : 1

Result : 10"

Also,

this is not matching word. This needs to be find the position (Index) of the string to get.

Example.

InputParam = 4 (it means 4th position of my string)

So, 4th position is : 004 (MyString = "10"-550-HO-004-01-12XVRU-XA")

004 ==> is my 4th position want to fetch.

1st position is : 10" (MyString = "10"-550-HO-004-01-12XVRU-XA")

10" ==> is my 1st position want to fetch.
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gani tpt
Gani tpt

ASKER

Thanks..It's working