What is the single data gap that is being said, and what if multiple data is queried for LINQ?
Then LINQ should use the keyword join on equals
Existing code:
Static voidMain (string[] args) { varStrarray =New[] {"A","B","C","D","E","F"}; varNumarray =New[] {0,1,2,3,4,5,6,7,8,9 }; varList = fromIinchNumarray Join Sinchstrarray on strarray[i] equals sSelecti; foreach(varIteminchlist) {Console.Write ($"{Item}"); }
See
The array of strings has 6 elements, the number array has 10,
I want to query the elements of the largest array of numbers that match the output of the string array.
is how much of a numeric array is subscript/index that can conform to a string array
There is no where keyword but a join on equals is used
inch Strarray on strarray[i] equals s
Explain this line of code in detail:
Join S in Strarray
Equivalent to
from S in Strarray
-------------------------------------------
On strarray[i] equals s
Equivalent to
where S==strarray[i]
This whole code can be interpreted as using S to draw Strarray when Strarray[i] is equal to S
Then the above code can also be organized as:
varStrarrat =New[] {"A","B","C","D","E","F"}; varNumarray =New[] {0,1,2,3,4,5,6,7,8,9 }; varList = fromIinchNumarray fromSinchStrarraywherei<Strarray.lengthwherestrarray[i]==sSelectI
As for which way to use, this is a personal hobby.
C # LINQ (5)