Create a new TData that can be added using Add<(Of <<'(TData>)>>)(TData).
This method triggers the event OnNew for the return value of the method.
Namespace: Composite.DataAssembly: Composite (in Composite.dll) Version: 5.3.6135.33083
Syntax
C# |
---|
public static TData New<TData>() where TData : class, IData |
Visual Basic |
---|
Public Shared Function New(Of TData As {Class, IData}) As TData |
Visual C++ |
---|
public: generic<typename TData> where TData : ref class, IData static TData New() |
Type Parameters
- TData
- An IData interface
Return Value
Returns a new instance of the TData
Examples
Here is an example of how to create a new IData instance and add it to the C1 storage.
CopyC#

using (DataConnection connection = new DataConnection()) { IMyDataType myDataType = DataConnection.New<IMyDataType>(); myDataType.Name = "John Doe"; connection.Add<IMyDataType>(myDataType); }