Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Way to short #9274

Closed
LJ9999 opened this issue Nov 27, 2018 — with docs.microsoft.com · 3 comments
Closed

Way to short #9274

LJ9999 opened this issue Nov 27, 2018 — with docs.microsoft.com · 3 comments
Labels
dotnet-csharp/svc support-request Support-style question;customer needs help solving a problem [org][type][category]

Comments

Copy link

LJ9999 commented Nov 27, 2018

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.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@mikkelbu
Copy link
Contributor

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>)

@BillWagner
Copy link
Member

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?

@Thraka Thraka added question and removed ⌚ Not Triaged Not triaged labels Dec 11, 2018
@Thraka Thraka added support-request Support-style question;customer needs help solving a problem [org][type][category] and removed support-request Support-style question;customer needs help solving a problem [org][type][category] question labels Jun 10, 2019
@BillWagner
Copy link
Member

closing due to lack of response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-csharp/svc support-request Support-style question;customer needs help solving a problem [org][type][category]
Projects
None yet
Development

No branches or pull requests

5 participants