Home Forums C# Programming Global module in C# Re: Re: Global module in C#

#3656
will
Participant

There is no such thing in C# instead you can create a public class in any namespace with Static Members functions like:


namespace GlobalFunctions //You can name it anything you want
{
public class ClassName //Name your class
{
ClassName bers() {} // Constructor for class
public static bool AnyFunction()
{
return true;
}
}
}

//Use it in Other classes
using GlobalFunctions
bool isTrue = ClassName.anyFunction();