How can I refer to F # names containing a single quote in a C # context?

This mainly happens when trying to debug F # code in a Visual Studio debugger that expects C # syntax:

The debugger does not recognize F # expressions. To enter an expression in the debugger window or a dialog box while debugging F #, you must translate the expression into C # syntax. When you translate an F # expression into C #, be sure to remember that C # uses == as a comparison operator for equality, and that F # uses a single =.

(from http://msdn.microsoft.com/en-us/library/vstudio/ee843932.aspx )

The problem is that I have variables and functions that contain single quotes, such as path', but single quotes seem to be invalid in C # names, so typing path'in the debugger window just says Newline expected in constantor words to that effect because it thinks that I'm starting a letter character. Even right-clicking on it and adding hours through the context menu gives a similar error.

How can I translate F # names containing single quotes into C # syntax so that I can check them from the debugger or refer to them from C # code?

+4
source share
1 answer

, , path' , #, pathAux.

F # ( , path' ``whatever !``), , #- , - , #.

+3

Source: https://habr.com/ru/post/1527127/


All Articles