tagged [operators]
C# bitwise rotate left and rotate right
C# bitwise rotate left and rotate right What is the C# equivalent (.NET 2.0) of `_rotl` and `_rotr` from C++?
- Modified
- 15 Jan at 17:25
What does question mark and dot operator ?. mean in C# 6.0?
What does question mark and dot operator ?. mean in C# 6.0? With C# 6.0 in the VS2015 preview we have a new operator, `?.`, which can be used like this: What exactly does it do?
?: Operator Vs. If Statement Performance
?: Operator Vs. If Statement Performance I've been trying to optimize my code to make it a little more concise and readable and was hoping I wasn't causing poorer performance from doing it. I think my...
- Modified
- 15 Oct at 16:8
Conditional XOR?
Conditional XOR? How come C# doesn't have a conditional `XOR` operator? Example:
- Modified
- 12 Aug at 09:23
C# bitwise equal bool operator
C# bitwise equal bool operator Boolean in C# are 1 byte variables. And because bool are shortcuts for the Boolean class, I would expect that the , operations have been overridden to let them work with...
- Modified
- 31 Jul at 09:45
Why does the C# compiler translate this != comparison as if it were a > comparison?
Why does the C# compiler translate this != comparison as if it were a > comparison? I have by pure chance discovered that the C# compiler turns this method: …into this [CIL](http://en.wikipedia.org/wi...
- Modified
- 19 Jul at 08:30
Is this big complicated thing equal to this? or this? or this?
Is this big complicated thing equal to this? or this? or this? Let's say I'm working with an object of class `thing`. The way I'm getting this object is a bit wordy: I'd like to see if this `thing` is...
What's the difference between & and && in MATLAB?
What's the difference between & and && in MATLAB? What is the difference between the `&` and `&&` logical operators in MATLAB?
- Modified
- 26 Apr at 19:23
What does the ?. mean in C#?
What does the ?. mean in C#? From the project `Roslyn`, file `src\Compilers\CSharp\Portable\Syntax\CSharpSyntaxTree.cs` at line `446` there is: What is the `?.` there? Does it check whatever oldTree i...
SQL Logic Operator Precedence: And and Or
SQL Logic Operator Precedence: And and Or Are the two statements below equivalent? and Is there some sort of truth table I could use to verify this?
- Modified
- 18 Feb at 14:42
How to use greater than operator with date?
How to use greater than operator with date? No idea what is going on here. Here is the query, right from phpMyAdmin: ``` SELECT * FROM `la_schedule` WHERE 'start_date' >'2012-11-18'; ``` But I consist...
Do short-circuiting operators || and && exist for nullable booleans? The RuntimeBinder sometimes thinks so
Do short-circuiting operators || and && exist for nullable booleans? The RuntimeBinder sometimes thinks so I read the C# Language Specification on the `||` and `&&`, also known as the short-circuiting...
- Modified
- 16 Dec at 16:11
Bitwise operation and usage
Bitwise operation and usage Consider this code: ``` x = 1 # 0001 x
- Modified
- 25 Oct at 12:39
If the left operand to the ?? operator is not null, does the right operand get evaluated?
If the left operand to the ?? operator is not null, does the right operand get evaluated? I'm looking at using the `??` operator (null-coalescing operator) in C#. But the [documentation](http://msdn.m...
What does the question mark in member access mean in C#?
What does the question mark in member access mean in C#? Can someone please explain to me what does the question mark in the member access in the following code means? Is it part of standard C#? I get...
What does ||= (or-equals) mean in Ruby?
What does ||= (or-equals) mean in Ruby? What does the following code mean in Ruby? Does it have any meaning or reason for the syntax?
What's the difference between equal?, eql?, ===, and ==?
What's the difference between equal?, eql?, ===, and ==? I am trying to understand the difference between these four methods. I know by default that `==` calls the method `equal?` which returns true w...
- Modified
- 8 Sep at 16:34
What does the ++ (or --) operator return?
What does the ++ (or --) operator return? While playing around with the `++` operator, I tried to write the following: I expected this to compile at first, but I got a compiler error: > The operand of...
How can "x & y" be false when both x and y are true?
How can "x & y" be false when both x and y are true? ## Context: I'm learning C# and have been messing about on the [Pex for fun](http://pexforfun.com/) site. The site challenges you to re-implement a...
- Modified
- 10 Jul at 22:22
What do two left-angle brackets "<<" mean in C#?
What do two left-angle brackets "
- Modified
- 18 Jun at 04:13
Which is faster? ++, += or x + 1?
Which is faster? ++, += or x + 1? I am using C# (This question is also valid for similar languages like C++) and I am trying to figure out the fastest and most efficient way to increment. It isn't jus...
- Modified
- 11 Mar at 17:58
Is there a "null coalescing" operator in JavaScript?
Is there a "null coalescing" operator in JavaScript? Is there a null coalescing operator in Javascript? For example, in C#, I can do this: The best approximation I can figure out for Javascript is usi...
- Modified
- 22 Feb at 09:24
What do two left angle brackets mean?
What do two left angle brackets mean? I saw a loop which I've never seen before: ``` for (int i = 0; i
- Modified
- 1 Feb at 14:23
Implicit (bool) and == operator override - handle if statements correctly
Implicit (bool) and == operator override - handle if statements correctly I have a custom class with implement both the `==` and the `implicit` for boolean operator. Is this the correct way to handle ...
- Modified
- 31 Jan at 16:55