【发布时间】:2012-02-01 07:52:39
【问题描述】:
可能重复:
What's the use/meaning of the @ character in variable names in C#?
C# prefixing parameter names with @
我觉得我应该知道这一点,但我发现用谷歌搜索是不可能的。 以下是我遇到的一些 Linq 代码的摘录:
private static readonly Func<SomeEntities, someThing, List<someThing>> GetReplacement =
(someEntities, thing) => someEntities.someReplacement.Join(someEntities.someThing,
replaces => replaces.new_thing_id,
newThing => newThing.thing_id,
(rep, newThing) => new {rep, newThing}).Where(
@t => @t.rep.thing_id == thing.thing_id).
Select
(
@t => @t.newThing
).ToList().Distinct(new SomeThingComparer()).ToList();
'@'前缀在这种情况下是什么意思?
【问题讨论】:
标签: c# linq entity-framework lambda