What I need to know is how to read rocket science like this: Where<TSource>(IEnumerable<TSource>, Func<TSource, Int32, Boolean>)
There is nowhere on the web that explains these fundamentals and yet most of C# is defined this way.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi @LJ9999 You will need to read the sections below "Generics", https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/. I don't think that there is anything about this under "classes-and-structs"
The way to read Where<TSource>(IEnumerable<TSource>, Func<TSource, Int32, Boolean>)
is that the method called Where
is generalised to an arbitrary type, called TSource
. The method takes an IEnumerable
of this type and a function from this type and an integer to a boolean value.
So if TSource
is a string, then the signature would be Where<string>(IEnumerable<string>, Func<string, Int32, Boolean>)
Thanks for bringing this to our attention @LJ9999. I see that @mikkelbu has provided some good information about this topic. Does that help with your question? What else are you looking for?
closing due to lack of response.
Most helpful comment
Hi @LJ9999 You will need to read the sections below "Generics", https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/generics/. I don't think that there is anything about this under "classes-and-structs"
The way to read
Where<TSource>(IEnumerable<TSource>, Func<TSource, Int32, Boolean>)
is that the method calledWhere
is generalised to an arbitrary type, calledTSource
. The method takes anIEnumerable
of this type and a function from this type and an integer to a boolean value.So if
TSource
is a string, then the signature would beWhere<string>(IEnumerable<string>, Func<string, Int32, Boolean>)