Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /*
- from Lesson 5 of C# console programming tutorial series at following URL:
- http://williammillerservices.com/windows-c-console-programming/
- demonstrates invoking a method from within Main() and passing it a string argument
- GitHub gist -> https://gist.github.com/kyrathasoft/d76dad203ea9c0a8e342fa24bc77dde0
- Pastebin.com -> https://pastebin.com/dLA4DUMb
- */
- namespace MyNamespace {
- class MyClass {
- static void Main(string[] args){
- //This time we'll pass a string to Howdy()
- Howdy("You're an enthusiastic crowd"); //we called Howdy()
- }
- //method Howdy() will be called from within Main()
- static void Howdy(string descriptor){
- Console.WriteLine("Howdy folks! {0}!", descriptor);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement