Is there a way to "Import" a static class in C# such as System.Math? I have included a comparison.
Imports System.Math
Module Module1
Sub Main()
Dim x As Double = Cos(3.14) ''//This works
End Sub
End Module
Vs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Math; //cannot import a class like a namespace
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double x = Math.Cos(3.14);
double y = Cos(3.14); //Cos does not exist in current context
}
}
}