Created
August 31, 2016 09:32
-
-
Save kemiller2002/ae80551a36c8073403b03e720e30613b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace TestOutVariable | |
{ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace OutExamples | |
{ | |
class Program | |
{ | |
struct PersonInformation | |
{ | |
public String Name; | |
public String PhoneNumber; | |
} | |
static void Main(string[] args) | |
{ | |
string name; | |
var person = new PersonInformation { Name = "jenny", PhoneNumber = "867-5309" }; | |
GetName(ref person, out name); | |
MakeNameCapitalized(ref name); | |
Console.WriteLine(person.Name); | |
} | |
static void GetName(ref PersonInformation person, out string name) | |
{ | |
name = person.Name; | |
} | |
public static void MakeNameCapitalized(ref string name) | |
{ | |
name = name[0].ToString().ToUpper() + String.Join("", name.Skip(1)); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment