반응형
SMALL
using System;
using System.Collections;
namespace Study09
{
class App
{
ArrayList list; //변수 정의
Point3D point3D;
//생성자
public App()
{
//Console.WriteLine(point3D); //선언만으로 인스턴스 생성가능
//pint3D = new Point3D(10,0,0);
//Console.WriteLine(point3d); // new 키워드 사용 가능
point3D.x = 10;
point3D.y = 10;
point3D.z = 10;
Point3D point3d2 = new Point3D(100, 200, 300);
Point3D point3d3 = point3d2;
point3d3.z = 400;
Console.WriteLine("{0},{1},{2}",point3d2.x, point3d2.y, point3d2.z);
Console.WriteLine("{0},{1},{2}",point3d3.x, point3d3.y, point3d3.z);
}
}
}
반응형
LIST
'C# > 수업 내용' 카테고리의 다른 글
List사용 연습 (1) | 2023.01.10 |
---|---|
오전 수업내용 : 일반화 메서드 (0) | 2023.01.10 |
오전 수업 내용 : 컬렉션 (0) | 2023.01.10 |
2023.01.10 오전 수업내용 : 프로퍼티 (0) | 2023.01.10 |
오전 : 2차원 배열 기본 (0) | 2023.01.09 |