Method GetOrInit
GetOrInit<T>(ref T?, Func<T>)
public static T GetOrInit<T>(ref T? location, Func<T> init) where T : class
Parameters
locationTinitFunc<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
locationTinitFunc<TParam, T>paramTParam
Returns
- T
Type Parameters
TParamT
GetOrInit<T>(ref T?, delegate*<T>)
public static T GetOrInit<T>(ref T? location, delegate*<T> init) where T : class
Parameters
locationTinitdelegate*<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
locationTinitdelegate*<TParam, T>objTParam
Returns
- T
Type Parameters
TTParam
Remarks
This overload may not work on some older Mono implementations, which do not have good function pointer support.