Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我想使用 linq 时,我有一个名为 group 的列在 linq 关键字和 syn-tacks 错误中给我这个错误
例如
var b=(from a in city.tbl_family where a.group==1 select a)
给我错误a.group==1
a.group==1
试着写:
var b=(from a in city.tbl_family where a.@group==1 select a)
@ 符号允许您在 C# 中使用保留字作为变量名等。它允许您编写例如:
var @class = "My text";
如果没有 @ 符号,它将在哪里给出编译器错误。