ByteViewer::SetFile Method (String^)

 

Sets the file to display in the viewer.

Namespace:   System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

public:
virtual void SetFile(
	String^ path
)

Parameters

path
Type: System::String^

The file path to load from.

Exception Condition
ArgumentNullException

path is null.

ArgumentException

path is an empty string (""), contains only white space, or contains one or more invalid characters.

DirectoryNotFoundException

The specified path is invalid, such as being on an unmapped drive.

IOException

The file load failed.

PathTooLongException

The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.

UnauthorizedAccessException

The access requested is not permitted by the operating system for the specified path, such as when access is Write or ReadWrite and the file or directory is set for read-only access.

The viewer loads the data to view from the specified file. This method throws an exception if the file load fails.

.NET Framework
Available since 1.1
Return to top
Show: