verbatim-string Questions
4
Solved
I'm trying to create a string literal representing an array of JSON objects so I thought of using string interpolation feature as shown in the code below:
public static void MyMethod(string abc, ...
Gusher asked 16/6, 2017 at 6:47
7
Solved
In a verbatim string literal (@"foo") in C#, backslashes aren't treated as escapes, so doing \" to get a double quote doesn't work. Is there any way to get a double quote in a verbatim string liter...
Bruch asked 18/12, 2009 at 15:36
5
I love using the @"strings" in c#, especially when I have a lot of multi-line text. The only annoyance is that my code formatting goes to doodie when doing this, because the second and greater line...
Inert asked 24/8, 2011 at 15:30
2
Solved
I am looking for a verbatim strings in Rust (like in C# with @"This is a string and here ""I am between quotes without making a fuss""").
Is there something similar?
Numskull asked 4/12, 2018 at 12:44
2
I ran into an interesting problem today where my tests were failing consistently on the build machine when they worked just fine on my machine even using the same configuration. When I looked at th...
Heteroecious asked 10/1, 2018 at 22:2
7
Solved
How do you do a verbatim string literal in VB.NET?
This is achieved in C# as follows:
String str = @"c:\folder1\file1.txt";
This means that the backslashes are treated literally and not as esca...
Flyblow asked 31/10, 2012 at 10:4
2
Solved
We would like to maintain the emails that are sent from our ASP.NET Web Application in a database. The idea was that the format of emails are stored in a database.
The problem is that emails shoul...
Parietal asked 13/7, 2016 at 15:12
3
Solved
I have a path that is named defaultPath I want to add it into this verbatim string literal but can quite get the quotes around it.
@"""C:\Mavro\MavBridge\Server\MavBridgeService.exe"" /service /...
Extensor asked 10/5, 2012 at 15:41
9
Solved
This is a .NET question for C# (or possibly VB.net), but I am trying to figure out what's the difference between the following declarations:
string hello = "hello";
vs.
string hello_alias = @"...
Uptotheminute asked 17/2, 2009 at 9:54
1
Solved
In C# 6 there is a new feature: interpolated strings. These let you put expressions directly into code.
Rather than relying on indexes:
string s = string.Format("Adding \"{0}\" and {...
Briannabrianne asked 26/7, 2015 at 15:12
1
I have a string as follows:
string example = @"string str = ""forty-two"";
char pad = '*';
the output is in a single line as follows:
string str = "forty-two"; c...
Rudie asked 28/6, 2015 at 6:59
5
Solved
I'm trying to extract information out of rc-files. In these files, "-chars in strings are escaped by doubling them ("") analog to c# verbatim strings. is ther a way to extract the string?
For exam...
Odaniel asked 21/11, 2012 at 14:34
3
Solved
I am a bit new to c#, and i am stuck at this point,
I have a regular string, where i made use of \ to escape ", escape here means that to escape the compilers interpretation of ", and get " ...
Knownothing asked 18/6, 2013 at 12:32
2
Solved
How do I provide an input string with automatic escaping to a console application?
I mean inside my code, I can do
public static void main(string[] args)
{
string myURL;
myFolder = @"C:\temp...
Anomalistic asked 10/4, 2013 at 17:14
7
Solved
I need to print
a
"b"
c
with the vebatim string, I posed another question about multiple line code template here.
I tried with verbatim string as follows :
using System;
class DoFile {...
Piping asked 13/5, 2011 at 18:46
4
I need to do the following C# code in C++ (if possible). I have to initialize a long string with lots of quotes and other stuff in it.
// C# verbatim string
const String _literal = @"I c...
Sanmiguel asked 8/4, 2010 at 3:2
7
Solved
I have the following string which won't compile:
String formLookupPull = @"SELECT value1, '"+tableName+"', '"+columnName+"' FROM lkpLookups WHERE ""table"" = '" + tableName + "' and ""field"" = '"...
Curvaceous asked 16/3, 2009 at 22:4
1
© 2022 - 2025 — McMap. All rights reserved.