Microsoft MVP성태의 닷넷 이야기
객체를 생성과 동시에 초기화 하는 방법 [링크 복사], [링크+제목 복사],
조회: 11812
글쓴 사람
Natie (jaewon.lee at kohyoung.com)
홈페이지
첨부 파일
 

안녕하세요

아래 예문을 보면
JsonSerializerSettings 형 객체를 생성함과 동시에
ReferenceLoopHandling과 StringEscapeHandling 를 초기화 하고 있습니다.

 [MessagePack.IgnoreMember]
        private static JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings
        {
            //Formatting = Formatting.Indented,
            ReferenceLoopHandling = ReferenceLoopHandling.Ignore,
            StringEscapeHandling = StringEscapeHandling.EscapeNonAscii,
        };

본 교재에 이러한 내용이 있는지 궁금합니다.
제가 봤을땐 없었거든요.. 제가 빠뜨렸을수도 있습니다 ㅜ

감사합니다!








[최초 등록일: ]
[최종 수정일: 5/13/2021]


비밀번호

댓글 작성자
 



2021-05-13 08시19분
C# 3.0에 추가된 구문으로 책에서는 "8.3 객체 초기화"에서 설명하고 있습니다.
정성태

NoWriterDateCnt.TitleFile(s)