알 수 없는 사용자 2014. 3. 31. 10:28

public class Chap3 : MonoBehaviour {


// Use this for initialization

void Start () {

char ch1 = 'a';

char ch2 = 'b';

char ch3 = '\\';

char t = '\t';

char n = '\n';

string e = "Hello" + n + t + t + "World";   //앞에 더 크면 뒤에꺼 자동 형변환 해줌니다.

string a = "Hello, World";

string b = "Hello,\tWorld";

string c = "Hello,\nWorld";

string d = e + c;

print ("ch1 " + ch1);

print ("ch2 " + ch2);

print ("ch3 " + ch3);

print ("a " + a);

print ("b" + b);

print ("c " + c);

print ("d" + d);

}

// Update is called once per frame

void Update () {

}

}


char 2바이트 연산이 안된다. char tostring으로 바꿔줘야 한다.