 | ObjectExtensionsToNullableInt64 Method |
Converts the value of the specified object to a 64-bit signed integer, using
the current culture formatting information. If the object has no value, a
null is returned.
Namespace:
TestHelperExtensions
Assembly:
CBI.TestHelperExtensions (in CBI.TestHelperExtensions.dll) Version: 2.1.0.1
Syntaxpublic static Nullable<long> ToNullableInt64(
this Object value
)
<ExtensionAttribute>
Public Shared Function ToNullableInt64 (
value As Object
) As Nullable(Of Long)
public:
[ExtensionAttribute]
static Nullable<long long> ToNullableInt64(
Object^ value
)
[<ExtensionAttribute>]
static member ToNullableInt64 :
value : Object -> Nullable<int64>
Parameters
- value
- Type: SystemObject
An object that implements the System.IConvertible interface.
Return Value
Type:
NullableInt64A nullable 64-bit signed integer that is equivalent to value, or null if value is null.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
RemarksUnfortunately, it appears that DBNull.Value is not available
in some of the portable frameworks so it cannot be tested for here.
See Also