Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello ,
Please help me with this problem
Now i need to write (") double quotes on to the output file.
But i cant define it or assign it to any variable. Please help.
Posted
Comments
LittleYellowBird 30-Jun-10 7:30am    
It would be very helpful if you could show how you are writting to the file and what you have tried. :)

C#
string s = @"""";
or
string s = "\"";
 
Share this answer
 
v2
Comments
asjadazeez 30-Jun-10 7:35am    
nice and easy thanks.
Couldn't you simply double up? Something like:

@"""help"""


or

"\"help"\"


Note that you have not stated what the format of the output file or where the data is coming from and in what format that is so I'm guessing.
 
Share this answer
 
v2
Comments
asjadazeez 30-Jun-10 7:34am    
the first one doesnt work. the second one works.
Thanks any way.
Toli Cuturicu 30-Jun-10 9:10am    
Now it works too!
You may use
strLine = CHR(34) & "Test Data" & CHR(34) 

or
strLine = """ & "Test Data" & """
 
Share this answer
 
Comments
asjadazeez 30-Jun-10 7:35am    
got it Thanks.
Toli Cuturicu 30-Jun-10 9:11am    
Reason for my vote of 1
No, you can't!
Toli Cuturicu 30-Jun-10 9:12am    
CHR does not exist.
& operator is not defined for strings
Goutam Patra 30-Jun-10 9:33am    
Nuts, Its in the Strings Class

Public Function Chr(ByVal CharCode As Integer) As Char
Member of: Microsoft.VisualBasic.Strings
Summary:
Returns the character associated with the specified character code.

Parameters:
CharCode: Required. An Integer expression representing the code point, or character code, for the character. If CharCode is outside the valid range, an System.ArgumentException error occurs. The valid range for Chr is 0 through 255, and the valid range for ChrW is -32768 through 65535.

Return Values:
Returns the character associated with the specified character code.

Find the same and reply

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900