How to escape backslash (\) in X++
There are times when you would want to write a backslash (\) in a string in X++. For instance, I would want to get the path of a file on Path:
C:\Users\UserName\Documents\Tasks
The backslash (“\”) character is a special escape character used to indicate other special characters such as new lines (\n), tabs (\t), or quotation marks (\”), therefore If you want to include a backslash character itself, you need two backslashes.
str itemFilePath = strFmt(“C:\\Users\\UserName\\Documents\Tasks”);
Merci
Your comment is awaiting moderation.
PURAVIVE REVIEWS