c# - Search string from array and reference array number -


I'm new to C #, and I do a string search to see if it's a string Members are trying to include array. Some of the string arrays are included, so I record the index number of the array members found it, and then want to display it.

  string stringToBeSearched = "I want to apply ITEM2 or item6"; String [] array = {"item 1", "item 2", "item 3"}; // Find anything in the array stringToBeSearched, then the number of integer position integer position = // array index item found in the Console.WriteLine // Enter the value of the member value ("{0} was found.", Array [position]) ; Console.ReadLine (); You can compare an array element with the  itemprop = "text"> 

stringToBeSearched after

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -