Skip to content

Instantly share code, notes, and snippets.

@Abiwax
Last active October 1, 2016 00:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abiwax/cc330c59fd083bc761c9aba48d75eb14 to your computer and use it in GitHub Desktop.
Save Abiwax/cc330c59fd083bc761c9aba48d75eb14 to your computer and use it in GitHub Desktop.
Working with functions
//You can only call functions with the same declared type without instantiating an object of the class.
public void Test1(){
Console.WriteLine("Ist Function and Other Function "+Test());
}
public int Test(){
return 2;
}
public static string Test2(){
return "2nd Function";
}
public int Test3(){
return Test();
}
public static void Main()
{
Program pr = new Program();
pr.Test1();
Program2 p2 = new Program2();
p2.Abi();
Console.WriteLine("Hello, I am main");
Console.WriteLine(Test2());
Console.WriteLine(pr.Test3());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment