Click or drag to resize

PathChangeExtension Method

Changes the extension of a path string.

Namespace:  Alphaleonis.Win32.Filesystem
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.0
Syntax
public static string ChangeExtension(
	string path,
	string extension
)

Parameters

path
Type: SystemString
The path information to modify. The path cannot contain any of the characters defined in GetInvalidPathChars.
extension
Type: SystemString
The new extension (with or without a leading period). Specify to remove an existing extension from path.

Return Value

Type: String
The modified path information.
Exceptions
ExceptionCondition
ArgumentException
See Also