the code need to be secure, all need to be checked... sarcasm
In my days I am sometimes wondering why we humanins are so hateful to computers. We ask them to make a job that is not used, even we order them to do it twice or more in a process flow. A time ago I was shocked when I saw a code review that was approved by a senior developer with more than 8 years of experience and written by other senior with more than 10 years of experience in the .Net area. What killed me is that nicely looking code makes more noise and brings no value, but cost precious CPU ticks. Please read below listing: What do you think? I hope that this not look familiar to you!!! So let's try to add some context, so the parameter is received by api endpoint, and then passed down. Now firstly we can see that it is converted from string to int , in a safe manner using int.TryParse . Next we see the same method invocation (as Int32 is return type of try/parse) and then this parameter is passed down to document generator, then to submethod where we can see an expensi