Share via


DependencyService.Get<T>(DependencyFetchTarget) Method

Definition

public static T Get<T> (Microsoft.Maui.Controls.DependencyFetchTarget fetchTarget = Microsoft.Maui.Controls.DependencyFetchTarget.GlobalInstance) where T : class;
static member Get : Microsoft.Maui.Controls.DependencyFetchTarget -> 'T (requires 'T : null)
Public Shared Function Get(Of T As Class) (Optional fetchTarget As DependencyFetchTarget = Microsoft.Maui.Controls.DependencyFetchTarget.GlobalInstance) As T

Type Parameters

T

Parameters

fetchTarget
DependencyFetchTarget

Returns

T

Applies to