tagged [null]
What is the PostgreSQL equivalent for ISNULL()
What is the PostgreSQL equivalent for ISNULL() In MS SQL-Server, I can do: `SELECT ISNULL(Field,'Empty') from Table` But in PostgreSQL I get a syntax error. How do I emulate the `ISNULL()` functionali...
- Modified
- 14 Jan at 02:34
Why doesn't the compiler at least warn on this == null
Why doesn't the compiler at least warn on this == null Why does the C# compiler not even complain with a warning on this code? : Obviously the condition will be satisfied..
- Modified
- 17 Mar at 16:41
C#: should object variables be assigned to null?
C#: should object variables be assigned to null? In C#, is it necessary to assign an object variable to `null` if you have finished using it, even when it will go out of scope anyway?
- Modified
- 11 Oct at 06:34
is there a Java equivalent to null coalescing operator (??) in C#?
is there a Java equivalent to null coalescing operator (??) in C#? Is it possible to do something similar to the following code in Java [More about ??](https://stackoverflow.com/a/446839)
- Modified
- 21 Aug at 08:29
How will a C# switch statement's default label handle a nullable enum?
How will a C# switch statement's default label handle a nullable enum? How will a C# switch statement's default label handle a nullable enum? Will the default label catch nulls and any unhandled cases...
- Modified
- 19 Feb at 05:33
C# HasValue vs !=null
C# HasValue vs !=null My question might sound a little foolish but it bugs me every time i face it. What is the difference between : and Does HasValue checks if `value` is null?
How to determine whether object reference is null?
How to determine whether object reference is null? What is the best way to determine whether an object reference variable is `null`? Is it the following?
- Modified
- 17 Aug at 06:54
error: ‘NULL’ was not declared in this scope
error: ‘NULL’ was not declared in this scope I get this message when compiling C++ on gcc 4.3 It appears and disappears and I don't know why. Why? Thanks.
Is there a way to check for both `null` and `undefined`?
Is there a way to check for both `null` and `undefined`? Since TypeScript is strongly-typed, simply using `if () {}` to check for `null` and `undefined` doesn't sound right. Does TypeScript have any d...
- Modified
- 23 Apr at 07:53
Best way to null check in Kotlin?
Best way to null check in Kotlin? Should I use double `=`, or triple `=`? or Similarly for 'not equals': or
- Modified
- 12 Mar at 12:41
check against: null vs default()?
check against: null vs default()? I want to check if a reference type is null. I see two options (_settings is of reference type FooType): and How do these two perform differently?
throwing an exception if an object is null
throwing an exception if an object is null I've recently discovered that: can be rewritten as Can the following be rewritten in a similar fashion?
- Modified
- 18 Feb at 01:25
An expression tree lambda may not contain a null propagating operator
An expression tree lambda may not contain a null propagating operator The line `price = co?.price ?? 0,` in the following code gives me the above error, but if I remove `?` from `co.?` it works fine. ...
- Modified
- 21 Oct at 13:47
What do two question marks together mean in C#?
What do two question marks together mean in C#? Ran across this line of code: What do the two question marks mean, is it some kind of ternary operator? It's hard to look up in Google.
- Modified
- 3 Apr at 11:10
Not equal <> != operator on NULL
Not equal != operator on NULL Could someone please explain the following behavior in SQL?
- Modified
- 9 Oct at 12:24
C# DateTime - How to check Time part is NULL?
C# DateTime - How to check Time part is NULL? Is there any easy way to check to see if the time part of the `DateTime` value is NULL other than checking hour is 0, min is 0 and sec is 0? Thanks.
Null vs. False vs. 0 in PHP
Null vs. False vs. 0 in PHP I am told that good developers can spot/utilize the difference between `Null` and `False` and `0` and all the other good "nothing" entities. What the difference, specifical...
Throwing ArgumentNullException in constructor?
Throwing ArgumentNullException in constructor? For a constructor with a single parameter, is it OK to throw an ArgumentNullException inside the constructor if the parameter is null/empty? OR, should i...
- Modified
- 2 Sep at 18:3
Easier way of writing null or empty?
Easier way of writing null or empty? I'm sure I've missed something here. With a certain project I need to check if a string is empty or null. Is there an easier way of writing this?
Using null-conditional bool? in if statement
Using null-conditional bool? in if statement Why this code works: but this code doesn't: saying So why is it not a language feature making such an implicit conversion in the statement?
- Modified
- 13 Jan at 15:31
await with null propagation System.NullReferenceException
await with null propagation System.NullReferenceException I have the following code: `Visual Studio` highlights this code, saying 'Possible NullReferenceException' by the way, without `await` `Visual ...
- Modified
- 30 May at 14:52
How to check for Is Not Null in VBA?
How to check for Is Not Null in VBA? Hi I have the following expression. I'm trying to say "if the second field Is Not Null". Can you help. Thanks
Why is it Valid to Concatenate Null Strings but not to Call "null.ToString()"?
Why is it Valid to Concatenate Null Strings but not to Call "null.ToString()"? This is valid C# code This is not valid C# code Why is the first statement valid?
What is the Kotlin double-bang (!!) operator?
What is the Kotlin double-bang (!!) operator? I'm converting Java to Kotlin with Android Studio. I get double bang after the instance variable. What is the double bang and more importantly where is th...
- Modified
- 20 Jan at 16:20
How do you deal with NULL values in columns of type boolean in MS Access?
How do you deal with NULL values in columns of type boolean in MS Access? I was wondering if there is a better way to cope with MS-Access' inability to handle NULL for boolean-values other than change...