DataTable 默认情况下字符串比较是不区分大小写的
如下:
DataRow[] tmpEntityRows = Entities.Select("Code='abc'");
//DataRow[] tmpEntityRows = Entities.Select("Code='ABc'");
都可查询到 Code=='ABC'的记录
若要区分大小写比较,设置属性为:
DataTable.CaseSensitive = true;
本文介绍了DataTable在字符串比较时不区分大小写的行为,并演示了如何通过设置CaseSensitive属性来实现大小写敏感比较。
DataTable 默认情况下字符串比较是不区分大小写的
如下:
DataRow[] tmpEntityRows = Entities.Select("Code='abc'");
//DataRow[] tmpEntityRows = Entities.Select("Code='ABc'");
都可查询到 Code=='ABC'的记录
若要区分大小写比较,设置属性为:
DataTable.CaseSensitive = true;
您可能感兴趣的与本文相关的镜像
Stable-Diffusion-3.5
Stable Diffusion 3.5 (SD 3.5) 是由 Stability AI 推出的新一代文本到图像生成模型,相比 3.0 版本,它提升了图像质量、运行速度和硬件效率
3032

被折叠的 条评论
为什么被折叠?