DependencyService.Get<T>(DependencyFetchTarget) Method

Definition

Returns the platform-specific implementation of type T.

public static T Get<T> (Xamarin.Forms.DependencyFetchTarget fetchTarget = Xamarin.Forms.DependencyFetchTarget.GlobalInstance) where T : class;
static member Get : Xamarin.Forms.DependencyFetchTarget -> 'T (requires 'T : null)

Type Parameters

T

The type of object to fetch.

Parameters

fetchTarget
DependencyFetchTarget

The dependency fetch target.

Returns

T

Applies to