Aracılığıyla paylaş


ShareFile Constructors

Definition

Overloads

ShareFile(FileBase)

Initializes a new instance of the ShareFile class from the given FileBase object.

ShareFile(String)

Initializes a new instance of the ShareFile class with the given file path.

ShareFile(String, String)

Initializes a new instance of the ShareFile class with the given file path and content type.

ShareFile(FileBase)

Source:
Share.shared.cs
Source:
Share.shared.cs

Initializes a new instance of the ShareFile class from the given FileBase object.

public:
 ShareFile(Microsoft::Maui::Storage::FileBase ^ file);
public ShareFile (Microsoft.Maui.Storage.FileBase file);
new Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile : Microsoft.Maui.Storage.FileBase -> Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile
Public Sub New (file As FileBase)

Parameters

file
FileBase

A FileBase object that will be wrapped in a ShareFile object.

Applies to

ShareFile(String)

Source:
Share.shared.cs
Source:
Share.shared.cs

Initializes a new instance of the ShareFile class with the given file path.

public:
 ShareFile(System::String ^ fullPath);
public ShareFile (string fullPath);
new Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile : string -> Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile
Public Sub New (fullPath As String)

Parameters

fullPath
String

The full path to the file represented by this object.

Applies to

ShareFile(String, String)

Source:
Share.shared.cs
Source:
Share.shared.cs

Initializes a new instance of the ShareFile class with the given file path and content type.

public:
 ShareFile(System::String ^ fullPath, System::String ^ contentType);
public ShareFile (string fullPath, string contentType);
new Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile : string * string -> Microsoft.Maui.ApplicationModel.DataTransfer.ShareFile
Public Sub New (fullPath As String, contentType As String)

Parameters

fullPath
String

The full path to the file represented by this object.

contentType
String

Explicit content type (MIME type) of the file (eg: image/png).

Applies to