Advertisement
kyrathasoft

method1

Jul 21st, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using System;
  2. /*
  3. from Lesson 5 of C# console programming tutorial series at following URL:
  4. http://williammillerservices.com/windows-c-console-programming/
  5. demonstrates invoking a method from within Main()
  6. GitHub gist -> https://gist.github.com/kyrathasoft/e19b0b8f2ea5e40af8cda06d8cbda812
  7. Pastebin.com -> https://pastebin.com/Xv6MYL6W
  8.  
  9. */
  10. namespace MyNamespace {
  11.    
  12.     class MyClass {
  13.        
  14.         static void Main(string[] args){
  15.             Howdy(); //we just called method Howdy
  16.         }
  17.        
  18.         //method Howdy() will be called from within Main()
  19.         static void Howdy(){
  20.             Console.WriteLine("Howdy folks!");
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement