ConnectionProfile.TryDeleteAsync ConnectionProfile.TryDeleteAsync ConnectionProfile.TryDeleteAsync ConnectionProfile.TryDeleteAsync ConnectionProfile.TryDeleteAsync Method

Definition

Asynchronously attempts to delete this connection profile; the operation may or may not succeed. Examine the return value to determine the outcome of the operation.

public : IAsyncOperation<ConnectionProfileDeleteStatus> TryDeleteAsync()
IAsyncOperation<ConnectionProfileDeleteStatus> TryDeleteAsync() const;
public IAsyncOperation<ConnectionProfileDeleteStatus> TryDeleteAsync()
Public Function TryDeleteAsync() As IAsyncOperation(Of ConnectionProfileDeleteStatus)
Windows.Networking.Connectivity.ConnectionProfile.tryDeleteAsync().done( /* Your success and error handlers */ );

Returns

An asychronous operation object which, when it completes, returns a ConnectionProfileDeleteStatus indicating whether or not the connection profile was deleted.

Additional features and requirements

Device family
Windows 10, version 1809 (introduced v10.0.17763.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v7)

Remarks

If you're unable to delete a connection profile, then that might be due to policies that have been configured by a network administrator. Also, you may need to configure additional capabilities in order to delete certain types of connection profiles. For Wi-Fi connection profiles, the wiFiControl capability is needed. Calling WiFiAdapter.RequestAccessAsync prior to attempting to delete any Wi-Fi connection profiles may allow additional connection profiles to be deleted.