In vb, you can create a 'module' to hold all public functions, sub, variables and etc. in c#, is that the same as a 'code file'?
Printable View
In vb, you can create a 'module' to hold all public functions, sub, variables and etc. in c#, is that the same as a 'code file'?
I found out you have to write a class for all the public stuff. :D
you can create a class with static methods mate. just like having Console.WriteLine(); writeline is a static member method of the console class. you can do no instantiation of the class
hope this helps mate. :)PHP Code:using System;
class sampleClass{
static void Main(){
moduleClass.print("hello world");
}
}
class moduleClass{
public static void print(string s){
Console.WriteLine(s);
}
}
ah. that's even better :D thanks a bunch! global variable would be declared public as normal? or should I create a public shared property?
well :bigyello: i'm no expert mate. hehe. i guess it's your choice mate. we both on the same direction. but i haven't encounter global variable declaration much. me dunno mate, :bigyello: