CADability dotNET
Reads or creates the requested object. Calls info.GetValue(key,type). If the object cannot be read, this method tries to invoke a constructor for the object with the given parameters. If the constructor invokation fails null will be returned.

Namespace: CADability
Assembly: CADability (in CADability.dll) Version: 1.1.4254.24737 (1.1.*)

Syntax

C#
public static Object ReadOrCreate(
	SerializationInfo info,
	string key,
	Type type,
	params Object[] args
)
Visual Basic
Public Shared Function ReadOrCreate ( _
	info As SerializationInfo, _
	key As String, _
	type As Type, _
	ParamArray args As Object() _
) As Object
Visual C++
public:
static Object^ ReadOrCreate(
	SerializationInfo^ info, 
	String^ key, 
	Type^ type, 
	... array<Object^>^ args
)

Parameters

info
Type: System.Runtime.Serialization..::..SerializationInfo
the SerializationInfo object
key
Type: System..::..String
the name of the object
type
Type: System..::..Type
the type of the requested object
args
Type: array<System..::..Object>[]()[][]
parameters for the constructor

Return Value

the read or created object

See Also