C or operator

0 votes

Is there or operator in C#?

I want something like this

if (ActionsLogWriter.Close or ErrorDumpWriter.Close == true)
{
    // Do stuff here
}
Jun 11 in C# by jyoti
• 1,140 points
7 views

1 answer to this question.

0 votes
This is interesting. So, there are two or options. First is the | and second one is the ||.

The distinction is that || only tests the right-side condition when it is essential, as opposed to ||, which constantly checks both the left and right requirements (if the left side evaluates to false).

This is important when the right-side condition involves processing or has negative side effects.
answered 3 days ago by krishna
• 1,340 points

Related Questions In C#

0 votes
1 answer

C# books or web sites for C++

I would recommend checking out C# in ...READ MORE

answered Jun 6 in C# by pranav
• 2,320 points
17 views
0 votes
1 answer
0 votes
1 answer

Convert VB.NET --> C# Projects

You may decompile whole Assemblies into Visual ...READ MORE

answered May 30 in C# by rajiv
• 1,620 points
18 views
0 votes
1 answer

What is the best C# to VB.net converter

Telerik has a solid SharpDevelop-based converter that ...READ MORE

answered May 30 in C# by rajiv
• 1,620 points
19 views
0 votes
3 answers

Trying to upload files using Selenium(C#)

You can try using Javascript Executor to ...READ MORE

answered Aug 23, 2019 in Selenium by Abha
• 28,100 points
4,466 views
0 votes
1 answer

Deploy my Windows 10 IOT core application locally!

Of course, you, can! That is, in ...READ MORE

answered Jul 17, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
499 views
+6 votes
16 answers

How do backend of these really cool games work?

Most of the games these days don't ...READ MORE

answered Jul 19, 2018 in Career Counselling by Kalgi
• 52,350 points
7,250 views
0 votes
1 answer
0 votes
1 answer

Simple VB or C# questions for an interview

The difficulty with asking language-specific questions for ...READ MORE

answered Jun 13 in C# by krishna
• 1,340 points
11 views
0 votes
1 answer

How do I turn a C# object into a JSON string in .NET

Newtonsoft.json can be used to accomplish this. ...READ MORE

answered Jun 13 in C# by krishna
• 1,340 points
9 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP