Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             string inString;
  14.  
  15.             inString = Console.ReadLine();
  16.  
  17.             MyFunction(inString); // This would print out "The passed parameter was: Wordddddds!"
  18.             AddTogether(1, 3); // This would print out "4";
  19.             AddSix(5); // This would print out "11";
  20.  
  21.             Console.Read();
  22.         }
  23.  
  24.         static void MyFunction(string passedString)
  25.         {
  26.             Console.WriteLine("The passed parameter was: " + passedString);
  27.         }
  28.  
  29.         static int AddTogether(int firstnumber, int secondNumber)
  30.         {
  31.             return firstnumber + secondNumber;
  32.         }
  33.  
  34.         static void AddSix(int Param1)
  35.         {
  36.             int numbersix = 6;
  37.             int result = Param1 + numbersix;
  38.  
  39.             Console.WriteLine(result);
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement