System.IO missing methods (Path.GetExtension() and more)

Hi,

I want to use the following method in a script :

In Mono I imported the related namespaces but I get the following error when I try to use Path.GetExtension() :

error CS0117 : 'Path' does not contain a definition for 'GetExtension'

How can I solve this ? I’m not very familiar with this kind of problems and I didn’t find any satisfying solution online for the moment…

Ok after several hours of searching I figured out that I was able to use the method by typing the whole path of the method (inside the runtime directory) :

using System.IO;
    
void Start()
{
    //Absolute path to the method (working, no need to import the System.IO namespace) :
    System.IO.Path.GetExtension("file.jpg");
    //Relative path to the method (error, even if the namespace has been imported) :
    Path.GetExtension("file.jpg");
}

I should add that I still don’t know why the “relative” path method call is not working, and I’d be glad to know !