Method CreateIfNull
CreateIfNull<T>(ref T)
Creates an instance of a class if it's null
.
Declaration
public static void CreateIfNull<T>(ref T obj) where T : class, new()
Parameters
Type | Name | Description |
---|---|---|
T | obj | A reference to an instance to check and create if needed |
Type Parameters
Name | Description |
---|---|
T | The type to create |