단리 모드의 응용

663 단어 패턴
using System; 
using System.Collections.Generic; 
using System.Text; 
namespace WindowsApplication1 
{ 
    public class Test 
    { 
        private static Test test;//             。 
        //           new   。 
        private Test() 
        { 
        } 
         //            。                
        public static Test jia() 
        { 
            if (test == null) 
            { 
                test = new Test(); 
            } 
            return test; 
        } 
    } 
} 

 
 

좋은 웹페이지 즐겨찾기