Skip to content

Instantly share code, notes, and snippets.

@sthoshi
Created August 18, 2017 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sthoshi/23b6a0e230cbc0df03865d50d9c6b0c9 to your computer and use it in GitHub Desktop.
Save sthoshi/23b6a0e230cbc0df03865d50d9c6b0c9 to your computer and use it in GitHub Desktop.
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