## Path::ChangeExtension method


Changes the extension in the specified file path.

```cpp
static String System::IO::Path::ChangeExtension(const String &path, const String &extension)
```


| Parameter | Type | Description |
| --- | --- | --- |
| path | const String\& | A file path |
| extension | const String\& | The extension to replace the one in **path** with |

### ReturnValue

**path** with extension replaced with **extension**

## See Also

* Class [String](../../../system/string/)
* Class [Path](../)
* Namespace [System::IO](../../)
* Library [Aspose.PUB for C++](../../../)
