Method GetOrInit
GetOrInit<T>(ref T?, Func<T>)
public static T GetOrInit<T>(ref T? location, Func<T> init) where T : class
Parameters
location
Tinit
Func<T>
Returns
- T
Type Parameters
T
GetOrInit<TParam, T>(ref T?, Func<TParam, T>, TParam)
public static T GetOrInit<TParam, T>(ref T? location, Func<TParam, T> init, TParam param) where T : class
Parameters
location
Tinit
Func<TParam, T>param
TParam
Returns
- T
Type Parameters
TParam
T
GetOrInit<T>(ref T?, delegate*<T>)
public static T GetOrInit<T>(ref T? location, delegate*<T> init) where T : class
Parameters
location
Tinit
delegate*<T>
Returns
- T
Type Parameters
T
Remarks
This overload may not work on some older Mono implementations, which do not have good function pointer support.
GetOrInit<T, TParam>(ref T?, delegate*<TParam, T>, TParam)
public static T GetOrInit<T, TParam>(ref T? location, delegate*<TParam, T> init, TParam obj) where T : class
Parameters
location
Tinit
delegate*<TParam, T>obj
TParam
Returns
- T
Type Parameters
T
TParam
Remarks
This overload may not work on some older Mono implementations, which do not have good function pointer support.