Notifications
Announcements
No record found.
Hi all,
Any differences if we use single quotes or double quotes for text string ?
For example in variable assignment or in select query condition ?
Is there any rule, lets say Best Practice rule for this ?
Thanks,
V
There is no difference in x++ code.
HI VoltesDev,
Supplement to mingzhou's reply, please refer to this:
https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-csharp-comparison-string-case-and-delimiters
Hi Blue,
I think it is different. I'm sorry, but I had to ask is the document you're sharing has a updated one that more comply with F&O current version ?
My finding is for text string use for variable / field assignment and X++ select query it is better to use single quotes, so it will not break BP Rule for Label Id.
Hi VoltesDev,
Yes, there are specific situations that will make a difference.
For example, constants, or expressions in the query range use single quotes.
You can find some from here:
https://docs.microsoft.com/en-us/dynamicsax-2012/developer/x-standards-constants
http://www.axaptapedia.com/Expressions_in_query_ranges
Hi Voltes,
Sorry, the link in the first reply is earlier, you can see this: docs.microsoft.com/.../xpp-cs-comparison
Search "Single" in Doc, you will find a lot.
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 551 Most Valuable Professional
André Arnaud de Cal... 450 Super User 2025 Season 2
BillurSamdancioglu 278 Most Valuable Professional