We were discussing with our coworkers on what it means if the method name starts with "Try".
There were the following opinions:
- Use "Try" when the method can return a null value.
- Use "Try" when the method will not throw an exception.
What is the official definition? What does "Try" say in the method name? Is there some official guideline about this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…