제목 : 8.7.1. Car.cs
    
    
        
            
                | 글번호: |  | 320 | 
            
                | 작성자: |  | 레드플러스 | 
            
                | 작성일: |  | 2007/02/09 오후 2:27:00 | 
            
            
                | 조회수: |  | 7530 | 
            
        
     
 
    
	
	
    
	using System;
public class Car
{
    //[1] public한 필드로 속성 흉내
    public static string Color;
    //[2] _(언더스코어) 문자로 속성에 대한 필드명 정의
    private static string _Type;
    //[3] public한 속성 정의 : 읽고 쓰기 가능한 속성
    public static string Type
    {
        get
        {
            return _Type;
        }
        set
        {
            _Type = value;
        }
    }
    //[4] 정적 객체를 생성하는 생성자
    static Car()
    {
        Color = "Red";
        _Type = "산타페";
    }
}
    
	
    
    
 
    
    
    
    
    
    
    
    
    
    
    
     
    
        