C# Programming Language: How to Add a Backslash Into a String

Creating a String with a Backslash

string myString = "Look \\ This is my backslash!";
Console.WriteLine(myString);
Output:
Look \ This is my backslash!

Conclusion

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Why I learned to code, as a designer

How to Learn Python (**FREE RESOURCES**)

Working with raw text using NLTK — PART-3

Why Should We Bother With Peer Programming?

Demystifying BigQuery reservations

REST: a FAQ

AWS Associate Cloud Architect Exam Preperation

How to Easily Add an Image Overlay to your Images with CSS

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jesse L

Jesse L

More from Medium

Generics in C#

Strings and its memory allocation in .NET

C# Value Types and Reference Types

Into Image

Pangram in C#