No you can't, but you don't really need to - you can just declare your own static class instead, for example:
public static class MyConvert
{
public static double Deg2Rad(double degrees)
{
return Math.PI / 180 * degrees;
}
}
Usage:
double radians = MyConvert.Deg2Rad(123);
(Obviously MyConvert
is a rubbish name, but you get the idea).
The only difference between the above and having the method on the system Convert
class is that if its on the Convert
class it looks like a built-in function, but you are going to struggle to convince me thats actually a good thing (I like to know when I'm calling framework code vs code maintained internally).