Notifications
Announcements
No record found.
Just curious why there are so many spaces.
I can see SalesTable spaces is for formatting purposes to align with the line below.
*This post is locked for comments
Hi Djim,
It is a best practice to put parameters on a seperate line.
I don't really know if it's a best practice, but what I usually see is that people tend to put the type on the same indentation level and the parameter name also under eachother on the same indentation level.
Same is taken in account for variables inside your method.
On your screenshot, it looks kind a weird though.
The method could look like this:
As you can see the types of the parameters are on the same indentation level and the names as well.
Here are some of the layout standards:
https://msdn.microsoft.com/en-us/library/aa619943.aspx
And here are some of the best practices in x++ coding:
https://msdn.microsoft.com/en-us/library/cc967435.aspx#Format
Hope that helps.
Kind regards,
Vincent Verweij
Vincent is correct about using spacing to have an overview and some structure. Your example is related to a customization, but not aligned correctly. It does say something about the developer... The example provided by Vincent is according the best practices.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2