tag:blogger.com,1999:blog-2458417257543687994.post5826997972703671269..comments2024-01-26T11:22:48.245-07:00Comments on Loyc, etc.: I want a conditional dot operatorQwertiehttp://www.blogger.com/profile/04595705428290721343noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-2458417257543687994.post-10985290136113606412018-06-14T06:27:35.736-06:002018-06-14T06:27:35.736-06:00Great Blog to read,Its gives more useful informati...Great Blog to read,Its gives more useful information. Thanks for sharing.<br /><a href="http://www.metaforumtechnologies.com/selenium-training-in-chennai" rel="nofollow">Selenium Training in Chennai</a><br />Anonymoushttps://www.blogger.com/profile/02077347230267963634noreply@blogger.comtag:blogger.com,1999:blog-2458417257543687994.post-72751209765542691012011-08-12T12:39:57.312-06:002011-08-12T12:39:57.312-06:00In Objective-C sending a message (something like i...In Objective-C sending a message (something like invoking a method) to nil results in nil (or 0 etc.) and will not throw a runtime error. See http://stackoverflow.com/questions/156395/sending-a-message-to-nil for details.<br /><br />I would also like to have this behaviour in C#. I am often confronted with the fact to export data to some files and I usually need to write code like "person.PhoneNumbers.FirstOrDefault().PhoneCenter.Address.Name.Abbreviation...." Normally, I end up with a helper Get.Value(() => x.y) which returns the value of the lamda, but surrounds the whole invocation chain with a try catch in order to catch a NullPointerException.Oliver Hanappihttps://www.blogger.com/profile/14486405181820122799noreply@blogger.com