作者热门文章
- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
方法名称以“Does”开头(在 C# 中)是否是一种好的做法?我觉得有点奇怪,所以我想听听你的意见。
我正在写一个检查帐户是否存在的方法,签名应该是“bool DoesAccountExist(id)”?有更好的名字吗?
谢谢!
最佳答案
在这种情况下,我个人会选择 AccountExists(id),因为它在 if block 中看起来更自然
if (AccountExists(id)) { }
关于c# - 以 "Does"开头的方法名称看起来不错吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5887450/
我是一名优秀的程序员,十分优秀!