Summary
Changes the extension of the path string.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Functions - Containing Type
- PathFunctions
Syntax
[Function("change-extension")]
public static string ChangeExtension(string path, string extension)
Remarks
For more information see the
System.IO.Path
documentation.
Attributes
Type | Description |
---|---|
FunctionAttribute | Indicates that the method should be exposed as a function in NAnt build files. |
Parameters
Name | Type | Description |
---|---|---|
path | string | The path information to modify. The path cannot contain any of the characters
defined in System.IO.Path.InvalidPathChars InvalidPathChars. |
extension | string | The new extension (with a leading period). Specify a null reference to remove an existing extension from path. |