VB.NET
Dim str As String = "Example String " & """" & "This is the String with double quotes." & """"
MessageBox.Show(str)
In VB.Net you can indicate that there is a double quote in a string by using 4 double quotes ("""").
C#.NET
string str = "Example String " + "\"" + "This is the String with double quotes." + "\"";
MessageBox.Show(str);
As you will notice in C# the double quote can be represented as double quote, back slash and again using two double quotes ("\"").
The above string will be displayed as follows.

3 comments:
thanx
thanx, that solve my problem.
Thanx Man U r G8...
Post a Comment