You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mark methods of Microsoft.VisualBasic.Information module with the ExtensionAttribute.
Make the compiler look at this special module first to resolve extension methods for objects if they are not members of the type itself, ignoring Option Strict On and any current limitations due to late binding. After all this is only one intrinsic module containing object-related jobs. SO, we can write:
Ifx.IsDbNullThen
Add some more useful functions to the module to shorten object checks syntax, such as IsSomething or HasValueor alike as proposed in I propose we add Something keyword #546.
Ifx.HasValueThen
The text was updated successfully, but these errors were encountered:
It is a VB.NET issue, since it needs a special treatment of the compiler.
There is also the issue when the object is Nothing. The workaround is to use the ? operator: If x?.IsDbNull
I think we should not need the ? since this is an extension method, but I don't know how the compiler acts in this case in runtime.
It is a VB.NET issue, since it needs a special treatment of the compiler.
There is also the issue when the object is Nothing. The workaround is to use the ? operator: If x?.IsDbNull
I think we should not need the ? since this is an extension method, but I don't know how the compiler acts in this case in runtime.
hmmm. I like how you're thinking here, but....
dimhaveValue=x.IsDbNullvsdimhaveValue=x?.IsDbNull
what's the correct response in each case if x is nothing ?
Based on #546, #547 I suggest to:
Option Strict On
and any current limitations due to late binding. After all this is only one intrinsic module containing object-related jobs. SO, we can write:IsSomething
orHasValue
or alike as proposed in I propose we add Something keyword #546.The text was updated successfully, but these errors were encountered: