Last active
October 1, 2016 00:24
-
-
Save Abiwax/cc330c59fd083bc761c9aba48d75eb14 to your computer and use it in GitHub Desktop.
Working with functions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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