Created
August 18, 2017 14:41
-
-
Save sthoshi/23b6a0e230cbc0df03865d50d9c6b0c9 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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Lesson1 : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
Person p = new Person (); | |
p.firstname = "太郎"; | |
p.lastname = "山田"; | |
Debug.Log (p.GetFullName ("★")); | |
} | |
// Update is called once per frame | |
void Update () { | |
} | |
} | |
class Person { | |
public string lastname; | |
public string firstname; | |
public string GetFullName (string separator){ | |
return this.lastname + separator + this.firstname; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment