IsNot Nothing very common, but it's double negative = o
I would like to use Exists . Is there a way to add a keyword to my VB vocab?
Currently, I have written an extension that adds _Exists() as a property for each object. I often use this, but I would prefer the actual keyword.
<HideModuleName()> Public Module CustomExtensions ''' <summary> ''' Returns <c>True</c> if [object] is not <c>Nothing</c>; otherwise <c>False</c>. ''' </summary> <System.Runtime.CompilerServices.Extension()> Public Function _Exists(obj As Object) As Boolean Return obj IsNot Nothing End Function End Module
I use only Visual Studio 2010, so if I could trick VS into converting my special phraseology into standard syntax, this would work for me.
Thanks!
source share