954,500 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to type "vertical" lines in C# programming?

Hi Im a beginner in programming C# while watching this tutorial on C# (writing a console application) the guy skipped over a couple segments in between parts of code.

Where he was doing "if" statements of " if (input3 == "n" (vertical lines here) input3 == "n").

Im wondering how was he able to type that is that a feature in visual studio? What keystroke is it? The significance and what does it mean..

Thanks!

Attachments C#_question_vertical_lines.PNG 33.72KB
techlawsam
Junior Poster in Training
56 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

alt + w (in european keyboards)

Mitja Bonca
Nearly a Posting Maven
2,485 posts since May 2009
Reputation Points: 641
Solved Threads: 474
 

what about for american english keyboards? What is the use for that symbol?

techlawsam
Junior Poster in Training
56 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

It's the character that is the shifted \ key = |

|| means "or" with the properties that if the part on the left of the || is true, the part on the right of the || is never evaluated (known as short circuiting). This can be done because in the logic true table for "or" if one side is true then the result is true. It speeds up evaluation a slight bit.

Momerath
Nearly a Senior Poster
3,384 posts since Aug 2010
Reputation Points: 1,232
Solved Threads: 558
 

awesome thanks @Momerath!

techlawsam
Junior Poster in Training
56 posts since Aug 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: