我怎么说不是,不是
我不想说:
(trsaz != v1) && (trsaz != v2) && ...
我想要这样的东西:
trsaz != (v1, v4, v7, v11)
这可能吗?或者除了 !=
之外还有其他东西吗?
i don't want to say:
(trsaz != v1) && (trsaz != v2) && ...
i want something like:
trsaz != (v1, v4, v7, v11)
Is this possible or is there also something else besides !=
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
实际上,我更喜欢为此创建一个小扩展方法:
它封装了所有黑魔法并使您的代码非常简洁,这就是您的目标,显然:
如果不重要,隐藏该机制总是好的,特别是在使用任何机制根本没有必要,并且会让一些维护代码的人感到困惑。
Actually, I prefer creating a little extension method for that:
It encapsulates all the black magic and makes your code really concise which is your goal, obviously:
It's always good to hide the mechanism if it's not important, especially in this case where the use of any mechanism is not necessary at all and will confuse some people who will maintain your code.