Click here to Skip to main content
15,891,473 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
Richard Deeming25-Feb-19 8:10
mveRichard Deeming25-Feb-19 8:10 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
BillWoodruff25-Feb-19 20:40
professionalBillWoodruff25-Feb-19 20:40 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
Super Lloyd18-Feb-19 16:19
Super Lloyd18-Feb-19 16:19 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
the goat in your machine18-Feb-19 17:15
the goat in your machine18-Feb-19 17:15 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
doobiester 19-Feb-19 2:11
doobiester 19-Feb-19 2:11 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
OriginalGriff18-Feb-19 20:53
mveOriginalGriff18-Feb-19 20:53 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
Nelek18-Feb-19 23:51
protectorNelek18-Feb-19 23:51 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
kalberts18-Feb-19 21:02
kalberts18-Feb-19 21:02 
You can use extension methods for all sorts of test (e.g. comparisons) to handle null arguments, so you don't have to explicitly test for null (or cause an exception when a null occurs).

This is obviously a good idea only if a null value is meaningful in the context. E.g. rather than

if (middleName != null && middleName.Equals("Peter")) ...

I write

if (middleName.Eq("Peter")) ...

with the Eq extension method checking the this argument for null before using it in an Equals test.
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
RickZeeland18-Feb-19 21:49
mveRickZeeland18-Feb-19 21:49 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
BillWoodruff19-Feb-19 0:08
professionalBillWoodruff19-Feb-19 0:08 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
RickZeeland19-Feb-19 1:10
mveRickZeeland19-Feb-19 1:10 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
BillWoodruff19-Feb-19 15:38
professionalBillWoodruff19-Feb-19 15:38 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
Eddy Vluggen19-Feb-19 3:11
professionalEddy Vluggen19-Feb-19 3:11 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
  Forogar  19-Feb-19 3:41
professional  Forogar  19-Feb-19 3:41 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
BillWoodruff19-Feb-19 15:35
professionalBillWoodruff19-Feb-19 15:35 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
  Forogar  21-Feb-19 2:32
professional  Forogar  21-Feb-19 2:32 
GeneralRe: C# Improving string.IsNullOrEmpty readability Pin
#realJSOP19-Feb-19 8:10
mve#realJSOP19-Feb-19 8:10 
GeneralHow to swear in Latin Pin
Brisingr Aerowing18-Feb-19 13:14
professionalBrisingr Aerowing18-Feb-19 13:14 
GeneralRe: How to swear in Latin Pin
Super Lloyd18-Feb-19 14:09
Super Lloyd18-Feb-19 14:09 
GeneralRe: How to swear in Latin Pin
Daniel Pfeffer18-Feb-19 21:16
professionalDaniel Pfeffer18-Feb-19 21:16 
GeneralRe: How to swear in Latin Pin
Marc Clifton19-Feb-19 1:49
mvaMarc Clifton19-Feb-19 1:49 
GeneralRe: How to swear in Latin Pin
dandy7219-Feb-19 9:07
dandy7219-Feb-19 9:07 
GeneralRoomba fail Pin
Brisingr Aerowing18-Feb-19 12:59
professionalBrisingr Aerowing18-Feb-19 12:59 
GeneralRe: Roomba fail Pin
OriginalGriff18-Feb-19 21:04
mveOriginalGriff18-Feb-19 21:04 
GeneralRe: Roomba fail Pin
CodeWraith18-Feb-19 23:28
CodeWraith18-Feb-19 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.