SerializationInfoExtensionsGetValueOrDefault(SerializationInfo, String, Object) Method
Namespace: KGySoft.Serialization.BinaryAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public static Object? GetValueOrDefault(
this SerializationInfo info,
string name,
Object? defaultValue = null
)
<ExtensionAttribute>
Public Shared Function GetValueOrDefault (
info As SerializationInfo,
name As String,
Optional defaultValue As Object = Nothing
) As Object
public:
[ExtensionAttribute]
static Object^ GetValueOrDefault(
SerializationInfo^ info,
String^ name,
Object^ defaultValue = nullptr
)
[<ExtensionAttribute>]
static member GetValueOrDefault :
info : SerializationInfo *
name : string *
?defaultValue : Object
(* Defaults:
let _defaultValue = defaultArg defaultValue null
*)
-> Object
- info SerializationInfo
- The SerializationInfo to retrieve the value from.
- name String
- The name of the value to be retrieved.
- defaultValue Object (Optional)
- The default value to return if name was not found. This parameter is optional.
Default value: .
ObjectThe found value or
if
name was not found in the
SerializationInfo.In Visual Basic and C#, you can call this method as an instance method on any object of type
SerializationInfo. 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).