Omgili - forum search, search forums  
  

Discussions about return null

Displaying 1 - 10 out of 57,990 discussions.  
RSS Feed Options
Time Frame: (Any time)   Minimum number of replies: (2)   Minimum number of discussing users: (0)
  |  

Page: 1   2   3   4   5   6   7   8   9   10  
Keep this page open to be updated with the newest discussions automatically.
I have a class with a static public property called "Info". via reflection i want to get this properties value, so i call: PropertyInfo pi myType.GetProperty("Info"); string info = (string) pi.GetValue(null, null); this works fine as long as the property...
Started by on , 6 posts by 6 people.  
My first guess would PluginInfo _PluginInfo = null; public static IPluginInfo PluginInfo { get { if (_PluginInfo == null = "PluginVersion"; } ....
That way you can break the debugger and look at the return value before it's lost.
I need to do a comparaison between an object and NULL. When the object is not NULL I fill it with some data. Here is the code : if (region != null) { .... } This is working but when looping and looping sometime the region object is NOT null (I can see...
Started by on , 8 posts by 8 people.  
R2)) { // handles if both are null as well as object identity return true; } if ((object)r1 == null || (object)r2 == null) { return false; } return (r1.Cmr.CompareTo(r2.Cmr) == 0 && r1.Id == r2.Id operator !....
I'm wondering whether it's considered okay to do something like this. if ( p_Pointer != NULL ) { return p_Pointer; } else { return NULL; } Without the else, whatever. The point is that if the pointer is null, NULL is going to be returned, so it would ...
Started by on , 5 posts by 5 people.  
) { return p_Pointer; } else { assert(p_Pointer); return NULL; } or assert(p_Pointer); return p_PointerYou could just say: return p_Pointer; Because the if statement is superfluous in that case to if( flag == TRUE )....
Ask your Facebook Friends
I have a link query that looks like this... var duration = Level3Data.AsQueryable().Sum(d => d.DurationMonths); If all the d.DurationMonths values are null the Sum returns 0. How can I make the Sum return null if all the d.DurationMonths are null? ...
Started by on , 4 posts by 4 people.  
As you indicated = Level3Data.AsQueryable(); var duration = q.All(d => d.DurationMonths == null) ? null : q.Sum(d => = Level....
) ? Level3Data.AsQueryable().Sum(d => d.DurationMonths) : null; Using Sum alone, this is impossible.
I have a table that has a processed_timestamp column -- if a record has been processed then that field contains the datetime it was processed, otherwise it is null. I want to write a query that returns two rows: NULL xx -- count of records with null timestamps...
Started by on , 13 posts by 12 people.  
In MySQL you could do something like SELECT IF(ISNULL(processed_timestamp), 'NULL', 'NOT NULL,NULL,'NULL','NOT NULL'), count(*) from table group by decode(field,NULL,'NULL','NOT NULL'); I'm sure ....
So let's say you have a function that returns a date Date myFunc(paramA, paramB){ //conditionally return a date? } So is it appropriate to return null from this function? This seems ugly because it forces clients to check for null. The "null object" pattern...
Started by on , 9 posts by 9 people.  
Document that it could return null, however(); }....
However if you want to return null on an error, consider throwing into the function far more than just getting a null returned.
null is quite acceptable.
How do you return 0 instead of null when running the following command: SELECT MAX(X) AS MaxX FROM tbl WHERE XID = 1 (Assuming there is no row where XID=1)
Started by on , 7 posts by 7 people.  
MAX(X), 0, MAX(X)) AS MaxX FROM tbl WHERE XID = 1 or SELECT CASE MAX(X) WHEN NULL THEN 0 ELSE MAX(X use COALESCE ( expression [ ,...n ] ) - returns first non-null like: SELECT COALESCE(MAX(X),0.
I have this code $return = $ep->$method($params); if ($return === null) { throw new Exception('Endpoint has no return value'); } return $return; Is there any way to distinguish between a method that returns null and a method that does not return anything...
Started by on , 4 posts by 4 people.  
Use null and you can use isEmpty see php....
You can return another value? Boolean true possibly, and check for that or null.
When no return value is set the function automatically returns null.
It's not possible.
Is it possible for a VB.net function with a return type of integer to return null ?
Started by on , 4 posts by 4 people.  
Both dommer and Mitch....
If you're strictly talking about a null reference (C#'s version of null) then the answer is No.
You'll need a return type of Nullable(Of Integer).
Only if it is defined as returning a nullable integer.
I have a method that is suppose to return an object if it is found. If it is not found, should I: a) return null b) throw an exception c) other
Started by on , 32 posts by 32 people.  
Generally it should return null then: Object....
Client code can then decide what to do.
The (for lack, then it's best to return null.
I prefer to just return a null, and rely on the caller to handle it appropriately.
Page: 1   2   3   4   5   6   7   8   9   10  
More Information


Forum Search About Omgili Help Plugins Forum/Board Owners Privacy

i
In Title
In Topic
In Reply
Exclude
Boost