Прочетете на английски Редактиране

Споделяне чрез


FileDialog.FileName Property

Definition

Gets or sets a string containing the full path of the file selected in a file dialog.

C#
public string FileName { [System.Security.SecurityCritical] get; [System.Security.SecurityCritical] set; }
C#
public string FileName { get; set; }

Property Value

A String that is the full path of the file selected in the file dialog. The default is Empty.

Attributes

Remarks

If more than one file name is selected (length of FileNames is greater than one) then FileName contains the first selected file name. If no file name is selected, this property contains Empty rather than null.

Applies to

Продукт Версии
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also