We have this expression:
var teste = meucotexto.minhatable.Where(x => x.meu_campo.....)
How do I read this part x => x.meu_campo
I read x is for x.my field or x for x.my field or something else?
We have this expression:
var teste = meucotexto.minhatable.Where(x => x.meu_campo.....)
How do I read this part x => x.meu_campo
I read x is for x.my field or x for x.my field or something else?
I do not think there is a universally appropriate way. We do not have to keep foolish formalisms just because it's right. The important thing is for people to communicate effectively. It is common to make simplifications when we speak or even write certain things that are strictly wrong, but that does not cause great problems. I give an example in #. It is common for everyone to pronounce the word "date" in English in the wrong way without causing problems. Everyone understands that we are talking about data, something digital.
The important thing is to maintain consistency among the people who will communicate.
I think the most used forms, at least in C #, is "becomes" , "turned into , / strong>. If I'm not mistaken I've heard the Anders Hejlsberg pronouncing and indicating this form.
I've also seen the use of "so that" or "such that" or even "such that" .
Another possibility would be a "going to" to indicate the parameter passing. Sounds like a less formal way to me. Curiously, Microsoft recommended this in VS2010 but gave up setting < a href="http://msdn.microsoft.com/en-us/library/bb397687%28v=vs.110%29.aspx"> in the following versions . Maybe you can use last .
It may depend on what the lambda means being used. See what a great expert, who knows how to unite theory with practice as few, read lambdas on the phone .
Its reading does not seem to me correct because there is no direct relation between them. "stands for" usually indicates proportionality, which does not occur with lambdas . But it is not a complete absurdity. If everyone who is communicating speaks so, whatever. The problem may occur when communicating externally. But as few people know the right way to pronounce, whatever. It is possible for people to understand each other more by use than by pronunciation.
But there are people who read "@" as "at" and not as "at" or "in" as they should be. And "#" as "piggyback" does not matter the context, so if someone reads "= >" like "arrow" or "double arrow," or "fat arrow," would not surprise me.
In your example I would read: "x becomes x.my field" or in more detail "xis becomes xis my field" . But you can read the text in a more complete context. It can read to make sense where it's being used and maybe even forget that this is a lambda . The complete line could be read as "In my context.minhatebela where x.meucampo equals such value" . Does this make sense to you and to whom you are speaking? If it does not, look for what it does and keep this pattern.
You should read the x
relation with Where
and minhatable
and not the x => x.meu_campo
relation.
That is, just like a SQL query, it would read, 'For every% of% in% with% where% of%, do something'.