Advertisement
kyrathasoft

method2

Jul 21st, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.73 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() and passing it a string argument
  6. GitHub gist -> https://gist.github.com/kyrathasoft/d76dad203ea9c0a8e342fa24bc77dde0
  7. Pastebin.com -> https://pastebin.com/dLA4DUMb
  8.  
  9. */
  10. namespace MyNamespace {
  11.    
  12.     class MyClass {
  13.        
  14.         static void Main(string[] args){
  15.             //This time we'll pass a string to Howdy()
  16.             Howdy("You're an enthusiastic crowd"); //we called Howdy()
  17.         }
  18.        
  19.         //method Howdy() will be called from within Main()
  20.         static void Howdy(string descriptor){
  21.             Console.WriteLine("Howdy folks! {0}!", descriptor);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement