Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MethodsPractice
- {
- class Program
- {
- static string SwitchName(string x, string y)
- {
- string firstName = x;
- string lastName = y;
- string temp = firstName;
- firstName = lastName;
- lastName = temp;
- string final = ("{0},{1}", firstName, lastName)
- return final;
- }
- static void Main(string[] args)
- {
- string nameReversed = "";
- string first = "Tim";
- string last = "Stern";
- nameReversed = SwitchName(first, last);
- Console.WriteLine(nameReversed);
- Console.ReadKey(true);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement