命名约定lambda表达式 [英] Naming convention for lambdas
问题描述
在事物的宏伟计划毫无用处的问题,但我很好奇 - 做什么,你都用你的lambda表达式内部的命名约定?
Pretty useless question in the grand scheme of things, but I'm curious - what do you all use for a naming convention inside your lambda expressions?
例如:
Database.TableName.Max(x => x.DateImported);
人在我的店里使用一些常见的东西是模式
, M
, X
,和一个答案:我喜欢命名变量他们代表,因此,如果我使用的是自行车类的lambda,我想它命名为 b
或者自行车
的这可能是正确的答案,但幽默我 - 你用什么,为什么
Some common things people use at my shop are model
, m
, x
, and one answer of: I like to name the variables as what they represent, so if I'm using a lambda on a bicycle class, I would name it either b
or maybe bicycle
. That's probably the 'right' answer, but humor me - what do you use and why?
推荐答案
的?类的第一个字母到拉姆达指(C为客户,邻订单,等...)
The first letter of the class to which the lambda refer to (c for Customer, o for Order, and so on...)
这篇关于命名约定lambda表达式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!