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
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.
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 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,
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
There is no difference in x++ code.
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 Andrés Arias as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Sohaib Cheema 777 User Group Leader
André Arnaud de Cal... 630 Super User 2025 Season 2
Martin Dráb 602 Most Valuable Professional