Export (0) Print
Expand All

VirtualPathProvider.OpenFile Method

Returns a stream from a virtual file.

Namespace:  System.Web.Hosting
Assembly:  System.Web (in System.Web.dll)

Public Shared Function OpenFile ( _
	virtualPath As String _
) As Stream


Type: System.String

The path to the virtual file.

Return Value

Type: System.IO.Stream
A read-only Stream object for the specified virtual file or resource.

The OpenFile method is a convenience method that enables you to get a stream from a virtual file without creating a VirtualPathProvider instance.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
© 2015 Microsoft