Some class has ugly field called URL, but Id rather call it file.
public static void setFile(this AxWMPLib.AxWindowsMediaPlayer mp, string filename) { mp.URL = filename; }
and
public static string file(this AxWMPLib.AxWindowsMediaPlayer mp) { return mp.URL; }
Is there any way to not use setFile, but make file act like property?
I think what you’re after is extension properties, which don’t exist. The extension methods require () to follow the method name when called.