What is the equivalent of a VB module in C#?
Answers
Answered by
0
//In a class file somehwere else in the world
namespace Global.Functions //Or whatever you call it
{
public class Numbers
{
private Numbers() {} // Private ctor for class with all static methods.
public static int MyFunction()
{
return 22;
}
}
}
//In Other Page
using Global.Functions
int Age = Numbers.MyFunction();
Similar questions