Today, when writing a macro that automatically generates code with VS.NET 2003, the accidental discovery of the escape character and C style escape characters in VB are different. Hey, because there is no application before this So I didn't notice at all. The following is the error code segment:
Private propertyString as string = _ "public {1} {0}" newline _ "/ {" newline _ "Get" newline _ "/ {" newline _ "Return {2};" NEWLINE _ "/}" newline _ "set" newline _ "/ {" newline _ "if (value == {2})" newline _ "/ {" newline _ " Return; " Newline _" /} " newline _" {2} = value; " newline _" /} " newline _" /} " newline
The function of the above code snippet is automatically generated according to the obtained attribute name, the attribute type, and the field name. Things happen this, press F5 to run, pop up the error window saying the wrong format, I am at the time Didn't turn around, is it wrong? Take a closer look, a line of comments to run, the result is that the problem is / {problem, I am depressed, is there been such a way to write? Open help search window, {, Popping up an error window report failed to complete the operation, check / {, the report failed to complete the operation, check "/ {" still failed to complete the operation, look at the shocking big red, I checked "Output Praggies", "Outter Brand", no results. Google, see some of the posts, the escape characters and C in the ASP are different, what is it? I am more depressed, after a long time, I suddenly remembered The T-SQL statement is in the sides of the middle bracket [], which means [[[] means, VB resection is also similar. After my attempt (finished, I guess it, VB Things are almost a lot of ideas, find a part of the escape character replacement rules when the string output in the VB style language (ie VB, VBS, VBA, ASP, VB.NET, etc.) is: 1. Use {{ Output {2. Use}} output} 3. Use "Output" 4. ', ~, $,%, ^, / and other traditional C syntax needed to export directly, these rules are just I got verified in Macro. I didn't really go to all VB style language. If some friends happen to hurt my brain, then he can look at it here, but if it is Have a friend to make a problem, I will make a problem, I am looking for me, I ... Flash ... First: P